2009-01-19 14:03:08 +00:00
|
|
|
--TEST--
|
|
|
|
Test function readgzfile() by substituting agument 2 with emptyUnsetUndefNull values.
|
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
|
|
|
if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
|
|
|
|
?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
$filename = dirname(__FILE__)."/004.txt.gz";
|
|
|
|
|
|
|
|
|
|
|
|
$unset_var = 10;
|
|
|
|
unset($unset_var);
|
|
|
|
|
|
|
|
$variation = array(
|
|
|
|
'unset var' => @$unset_var,
|
|
|
|
'undefined var' => @$undefined_var,
|
|
|
|
'empty string DQ' => "",
|
|
|
|
'empty string SQ' => '',
|
|
|
|
'uppercase NULL' => NULL,
|
|
|
|
'lowercase null' => null,
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
foreach ( $variation as $var ) {
|
|
|
|
var_dump(readgzfile( $filename, $var ) );
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
===DONE===
|
|
|
|
--EXPECTF--
|
|
|
|
When you're taught through feelings
|
|
|
|
Destiny flying high above
|
|
|
|
all I know is that you can realize it
|
|
|
|
Destiny who cares
|
|
|
|
as it turns around
|
|
|
|
and I know that it descends down on me
|
|
|
|
int(176)
|
|
|
|
When you're taught through feelings
|
|
|
|
Destiny flying high above
|
|
|
|
all I know is that you can realize it
|
|
|
|
Destiny who cares
|
|
|
|
as it turns around
|
|
|
|
and I know that it descends down on me
|
|
|
|
int(176)
|
|
|
|
|
|
|
|
Warning: readgzfile() expects parameter 2 to be long, string given in %s on line %d
|
|
|
|
NULL
|
|
|
|
|
|
|
|
Warning: readgzfile() expects parameter 2 to be long, string given in %s on line %d
|
|
|
|
NULL
|
|
|
|
When you're taught through feelings
|
|
|
|
Destiny flying high above
|
|
|
|
all I know is that you can realize it
|
|
|
|
Destiny who cares
|
|
|
|
as it turns around
|
|
|
|
and I know that it descends down on me
|
|
|
|
int(176)
|
|
|
|
When you're taught through feelings
|
|
|
|
Destiny flying high above
|
|
|
|
all I know is that you can realize it
|
|
|
|
Destiny who cares
|
|
|
|
as it turns around
|
|
|
|
and I know that it descends down on me
|
|
|
|
int(176)
|
2010-03-12 10:28:59 +00:00
|
|
|
===DONE===
|