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-- stream_get_contents() - Testing offset out of range --FILE-- <?php $tmp = tmpfil..
Decoded Output download
--TEST--
stream_get_contents() - Testing offset out of range
--FILE--
<?php
$tmp = tmpfile();
fwrite($tmp, "12345");
echo stream_get_contents($tmp, 2, 5), "--
";
echo stream_get_contents($tmp, 2), "--
";
echo stream_get_contents($tmp, 2, 3), "--
";
echo stream_get_contents($tmp, 2, -1), "--
";
?>
--EXPECT--
--
--
45--
--
Did this file decode correctly?
Original Code
--TEST--
stream_get_contents() - Testing offset out of range
--FILE--
<?php
$tmp = tmpfile();
fwrite($tmp, "12345");
echo stream_get_contents($tmp, 2, 5), "--\n";
echo stream_get_contents($tmp, 2), "--\n";
echo stream_get_contents($tmp, 2, 3), "--\n";
echo stream_get_contents($tmp, 2, -1), "--\n";
?>
--EXPECT--
--
--
45--
--
Function Calls
tmpfile | 1 |
Stats
MD5 | 7fd5a9c43bfbe079ba1dd5bb86cf4cc8 |
Eval Count | 0 |
Decode Time | 87 ms |