php-src/ext/spl/tests/SplFixedArray_setSize_param_array.phpt
Gabriel Caruso ce1d69a1f6 Use int instead of integer in type errors
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".
2018-02-04 19:08:23 +01:00

18 lines
384 B
PHP

--TEST--
SplFixedArray::setSize() with an array parameter
--CREDITS--
PHPNW Testfest 2009 - Adrian Hardy
--FILE--
<?php
$fixed_array = new SplFixedArray(2);
$fixed_array->setSize(array());
var_dump($fixed_array);
?>
--EXPECTF--
Warning: SplFixedArray::setSize() expects parameter 1 to be int, array given in %s on line %d
object(SplFixedArray)#1 (2) {
[0]=>
NULL
[1]=>
NULL
}