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 readgzfile() reading a gzip relative file --EXTENSIONS-- zlib --FIL..

Decoded Output download

--TEST--
Test function readgzfile() reading a gzip relative file
--EXTENSIONS--
zlib
--FILE--
<?php
$plaintxt = <<<EOT
hello world
is a very common test
for all languages

EOT;
$dirname = 'readgzfile_temp';
$filename = $dirname.'/readgzfile_basic.txt.gz';
mkdir($dirname);
$h = gzopen($filename, 'w');
gzwrite($h, $plaintxt);
gzclose($h);


var_dump(readgzfile( $filename ) );

unlink($filename);
rmdir($dirname);
?>
--EXPECT--
hello world
is a very common test
for all languages
int(52)

Did this file decode correctly?

Original Code

--TEST--
Test function readgzfile() reading a gzip relative file
--EXTENSIONS--
zlib
--FILE--
<?php
$plaintxt = <<<EOT
hello world
is a very common test
for all languages

EOT;
$dirname = 'readgzfile_temp';
$filename = $dirname.'/readgzfile_basic.txt.gz';
mkdir($dirname);
$h = gzopen($filename, 'w');
gzwrite($h, $plaintxt);
gzclose($h);


var_dump(readgzfile( $filename ) );

unlink($filename);
rmdir($dirname);
?>
--EXPECT--
hello world
is a very common test
for all languages
int(52)

Function Calls

mkdir 1

Variables

$dirname readgzfile_temp
$filename readgzfile_temp/readgzfile_basic.txt.gz
$plaintxt hello world is a very common test for all languages

Stats

MD5 8e9a3dc30ffe9ffb6bf5370a00ecd337
Eval Count 0
Decode Time 80 ms