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 gzopen() by calling it twice on the same file and not closing one o..
Decoded Output download
--TEST--
Test function gzopen() by calling it twice on the same file and not closing one of them at the end of the script
--EXTENSIONS--
zlib
--FILE--
<?php
$f = __DIR__."/004.txt.gz";
$h1 = gzopen($f, 'r');
$h2 = gzopen($f, 'r');
var_dump(gzread($h1, 30));
var_dump(gzread($h2, 10));
var_dump(gzread($h1, 15));
gzclose($h1);
var_dump(gzread($h2, 50));
// deliberately do not close $h2
?>
--EXPECT--
string(30) "When you're taught through fee"
string(10) "When you'r"
string(15) "lings
Destiny f"
string(50) "e taught through feelings
Destiny flying high abov"
Did this file decode correctly?
Original Code
--TEST--
Test function gzopen() by calling it twice on the same file and not closing one of them at the end of the script
--EXTENSIONS--
zlib
--FILE--
<?php
$f = __DIR__."/004.txt.gz";
$h1 = gzopen($f, 'r');
$h2 = gzopen($f, 'r');
var_dump(gzread($h1, 30));
var_dump(gzread($h2, 10));
var_dump(gzread($h1, 15));
gzclose($h1);
var_dump(gzread($h2, 50));
// deliberately do not close $h2
?>
--EXPECT--
string(30) "When you're taught through fee"
string(10) "When you'r"
string(15) "lings
Destiny f"
string(50) "e taught through feelings
Destiny flying high abov"
Function Calls
None |
Stats
MD5 | 8e9e4870987aca4bd87183025c2d62c9 |
Eval Count | 0 |
Decode Time | 70 ms |