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 gzwrite() by calling it when file is opened for reading --EXTENSION..

Decoded Output download

--TEST--
Test function gzwrite() by calling it when file is opened for reading
--EXTENSIONS--
zlib
--FILE--
<?php

$filename = __DIR__."/004.txt.gz";
$h = gzopen($filename, 'r');
$str = "Here is the string to be written. ";
$length = 10;
var_dump(gzwrite( $h, $str ) );
var_dump(gzread($h, 10));
var_dump(gzwrite( $h, $str, $length ) );
gzclose($h);

?>
--EXPECT--
int(0)
string(10) "When you'r"
int(0)

Did this file decode correctly?

Original Code

--TEST--
Test function gzwrite() by calling it when file is opened for reading
--EXTENSIONS--
zlib
--FILE--
<?php

$filename = __DIR__."/004.txt.gz";
$h = gzopen($filename, 'r');
$str = "Here is the string to be written. ";
$length = 10;
var_dump(gzwrite( $h, $str ) );
var_dump(gzread($h, 10));
var_dump(gzwrite( $h, $str, $length ) );
gzclose($h);

?>
--EXPECT--
int(0)
string(10) "When you'r"
int(0)

Function Calls

None

Variables

None

Stats

MD5 099e01bef9255274ca64daa13da44dad
Eval Count 0
Decode Time 85 ms