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 $h=0; $t=0; for($x=1;$x<=20;$x++) { $flip=rand(1,2); echo"The coin : ".$x..
Decoded Output download
<?php
$h=0;
$t=0;
for($x=1;$x<=20;$x++)
{
$flip=rand(1,2);
echo"The coin : ".$x." :is :";
if($flip==1);
{
$h=$h+1
echo "Head <img src=\"heads.jpg\" alt=\"head\"width=40px>
<br><br><br>";
$t++;
}
elseif ($flip==2);
$t=$t+1
{
echo "Tail <img src=\"tails.jpg"\" alt=\"tail\"width=40px>
<br><br><br>";
$t++;
}
$coins=($x-1);
echo "<br>The total coins flipped:" .$coins. "<img src=\"heads.jpg"\"alt=\"coin\"width=40px><br><br><br>";
$averagehead=($h/20)*100;
$averagetail=($t/20)*100;
echo"<br>Number of coins flipped heads: $h : ".$averagehead."%";
echo"<br>Number of coins flipped tails: $t : ".$averagetail."%";
?>
Did this file decode correctly?
Original Code
<?php
$h=0;
$t=0;
for($x=1;$x<=20;$x++)
{
$flip=rand(1,2);
echo"The coin : ".$x." :is :";
if($flip==1);
{
$h=$h+1
echo "Head <img src=\"heads.jpg\" alt=\"head\"width=40px>
<br><br><br>";
$t++;
}
elseif ($flip==2);
$t=$t+1
{
echo "Tail <img src=\"tails.jpg"\" alt=\"tail\"width=40px>
<br><br><br>";
$t++;
}
$coins=($x-1);
echo "<br>The total coins flipped:" .$coins. "<img src=\"heads.jpg"\"alt=\"coin\"width=40px><br><br><br>";
$averagehead=($h/20)*100;
$averagetail=($t/20)*100;
echo"<br>Number of coins flipped heads: $h : ".$averagehead."%";
echo"<br>Number of coins flipped tails: $t : ".$averagetail."%";
?>
Function Calls
| None |
Stats
| MD5 | bd9672f2dbe5074437ab0fddd3bdc4f5 |
| Eval Count | 0 |
| Decode Time | 71 ms |