mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01: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".
17 lines
347 B
PHP
17 lines
347 B
PHP
--TEST--
|
|
SplFixedArray::__construct() with string passed as parameter.
|
|
--CREDITS--
|
|
PHPNW Test Fest 2009 - Jordan Hatch
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
$array = new SplFixedArray( "string" );
|
|
} catch (TypeError $iae) {
|
|
echo "Ok - ".$iae->getMessage().PHP_EOL;
|
|
}
|
|
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Ok - SplFixedArray::__construct() expects parameter 1 to be int, string given
|