mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00

PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".
This a followup to ce1d69a1f6
, which
implements the same change for integer->int.
10 lines
No EOL
282 B
PHP
10 lines
No EOL
282 B
PHP
--TEST--
|
|
Tries to create a SplFixedArray using a boolean value.
|
|
--CREDITS--
|
|
Philip Norton philipnorton42@gmail.com
|
|
--FILE--
|
|
<?php
|
|
$array = SplFixedArray::fromArray(true);
|
|
?>
|
|
--EXPECTF--
|
|
Warning: SplFixedArray::fromArray() expects parameter 1 to be array, bool given in %s on line %d
|