Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Test function show_source() by calling it with its expected arguments and php out..
Decoded Output download
*** Test by calling method or function with its expected arguments and php output ***
baz
Did this file decode correctly?
Original Code
--TEST--
Test function show_source() by calling it with its expected arguments and php output, more test for highlight_file()
--CREDITS--
Francesco Fullone [email protected]
#PHPTestFest Cesena Italia on 2009-06-20
--FILE--
<?php
echo "*** Test by calling method or function with its expected arguments and php output ***\n";
$foo = 'bar';
$baz = "something ".$foo."\n";
if ( $foo == 'bar' )
{
$baz = "baz\n";
}
/* some code here */
echo $baz;
show_source(__FILE__);
echo $foo;
?>
--EXPECT--
*** Test by calling method or function with its expected arguments and php output ***
baz
<code><span style="color: #000000">
<span style="color: #0000BB"><?php<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"*** Test by calling method or function with its expected arguments and php output ***\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$foo </span><span style="color: #007700">= </span><span style="color: #DD0000">'bar'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$baz </span><span style="color: #007700">= </span><span style="color: #DD0000">"something "</span><span style="color: #007700">.</span><span style="color: #0000BB">$foo</span><span style="color: #007700">.</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br />if ( </span><span style="color: #0000BB">$foo </span><span style="color: #007700">== </span><span style="color: #DD0000">'bar' </span><span style="color: #007700">)<br />{<br /> </span><span style="color: #0000BB">$baz </span><span style="color: #007700">= </span><span style="color: #DD0000">"baz\n"</span><span style="color: #007700">;<br />}<br /><br /> </span><span style="color: #FF8000">/* some code here */<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">$baz</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">show_source</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$foo</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?><br /></span>
</span>
</code>bar
Function Calls
show_source | 1 |
Stats
MD5 | 41c6b3cea4c7cb531f306274c525e39c |
Eval Count | 0 |
Decode Time | 80 ms |