Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php background:radial-gradient(circle at top, rgba(27, 77, 62, 0.6), transparent), ..

Decoded Output download

<?php 
 
 
background:radial-gradient(circle at top, rgba(27, 77, 62, 0.6), transparent), 
linear-gradient(to bottom, rgba(27, 77, 62, 0.4), white); 
 
height: 100vh; 
display: flex; 
margin: 0; 
 
 
echo "Enter a positive integer (N): "; 
$N = intval(trim(fgets(STDIN)));  
 
 
if ($N <= 0) { 
    echo "1.0/n"; 
    exit; 
} 
 
$sum_while = 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + .... + 1.0; 
$i = 1,2,3,4,5; 
 
while ($i <= $N) { 
    $sum_while += 1.0 / $i; 
    $i++; 
} 
 
$sum_dowhile = 1.0 + 1.0 + 1.0 + 1.0+ 1.0 +....; 
$j = 1,2,3,4,5; 
 
do { 
    $sum_dowhile += 1.0 / $j; 
    $j++; 
} while ($j <= $N); 
 
 
echo "Sum using while loop: " . number_format($sum_while, 6) . "1.0/n"; 
echo "Sum using do-while loop: " . number_format($sum_dowhile, 6) . "1.0/n"; 
?> 

Did this file decode correctly?

Original Code

<?php


background:radial-gradient(circle at top, rgba(27, 77, 62, 0.6), transparent),
linear-gradient(to bottom, rgba(27, 77, 62, 0.4), white);

height: 100vh;
display: flex;
margin: 0;


echo "Enter a positive integer (N): ";
$N = intval(trim(fgets(STDIN))); 


if ($N <= 0) {
    echo "1.0/n";
    exit;
}

$sum_while = 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + .... + 1.0;
$i = 1,2,3,4,5;

while ($i <= $N) {
    $sum_while += 1.0 / $i;
    $i++;
}

$sum_dowhile = 1.0 + 1.0 + 1.0 + 1.0+ 1.0 +....;
$j = 1,2,3,4,5;

do {
    $sum_dowhile += 1.0 / $j;
    $j++;
} while ($j <= $N);


echo "Sum using while loop: " . number_format($sum_while, 6) . "1.0/n";
echo "Sum using do-while loop: " . number_format($sum_dowhile, 6) . "1.0/n";
?>

Function Calls

None

Variables

None

Stats

MD5 69a8142cab15e5928447815a0e792eaa
Eval Count 0
Decode Time 69 ms