mirror of
https://github.com/php/php-src.git
synced 2026-04-20 06:21:12 +02:00
PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".
40 lines
825 B
PHP
40 lines
825 B
PHP
--TEST--
|
|
Test function gzfile() by substituting argument 1 with boolean values.
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
|
|
$use_include_path =
|
|
|
|
|
|
$variation = array(
|
|
'lowercase true' => true,
|
|
'lowercase false' =>false,
|
|
'uppercase TRUE' =>TRUE,
|
|
'uppercase FALSE' =>FALSE,
|
|
);
|
|
|
|
|
|
foreach ( $variation as $var ) {
|
|
var_dump(gzfile( $var , $use_include_path ) );
|
|
}
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
|
|
Warning: gzfile() expects parameter 2 to be int, array given in %s on line %d
|
|
NULL
|
|
|
|
Warning: gzfile() expects parameter 2 to be int, array given in %s on line %d
|
|
NULL
|
|
|
|
Warning: gzfile() expects parameter 2 to be int, array given in %s on line %d
|
|
NULL
|
|
|
|
Warning: gzfile() expects parameter 2 to be int, array given in %s on line %d
|
|
NULL
|
|
===DONE===
|