mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +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".
18 lines
384 B
PHP
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
|
|
}
|