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 fflush() on a zlib stream wrapper --EXTENSIONS-- zlib --FILE-- <?ph..

Decoded Output download

--TEST--
Test function fflush() on a zlib stream wrapper
--EXTENSIONS--
zlib
--FILE--
<?php

$filename = "zlib_wrapper_fflush_basic.txt.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written.";
$length = 10;
var_dump(fflush($h));
gzwrite( $h, $str);
gzwrite( $h, $str);
var_dump(fflush($h));
gzclose($h);

$h = gzopen($filename, 'r');
gzpassthru($h);
gzclose($h);
echo "
";
unlink($filename);
?>
--EXPECT--
bool(true)
bool(true)
Here is the string to be written.Here is the string to be written.

Did this file decode correctly?

Original Code

--TEST--
Test function fflush() on a zlib stream wrapper
--EXTENSIONS--
zlib
--FILE--
<?php

$filename = "zlib_wrapper_fflush_basic.txt.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written.";
$length = 10;
var_dump(fflush($h));
gzwrite( $h, $str);
gzwrite( $h, $str);
var_dump(fflush($h));
gzclose($h);

$h = gzopen($filename, 'r');
gzpassthru($h);
gzclose($h);
echo "\n";
unlink($filename);
?>
--EXPECT--
bool(true)
bool(true)
Here is the string to be written.Here is the string to be written.

Function Calls

gzopen 1

Variables

$filename zlib_wrapper_fflush_basic.txt.gz

Stats

MD5 0cd93d7723102ed41516f4cdbd4d1085
Eval Count 0
Decode Time 81 ms