mirror of
https://github.com/php/php-src.git
synced 2026-03-28 18:22:42 +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".
22 lines
470 B
PHP
22 lines
470 B
PHP
--TEST--
|
|
SPL: spl_object_id()
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump(spl_object_id(new stdClass));
|
|
var_dump(spl_object_id(42));
|
|
var_dump(spl_object_id());
|
|
$a = new stdClass();
|
|
var_dump(spl_object_id(new stdClass) === spl_object_id($a));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
int(%d)
|
|
|
|
Warning: spl_object_id() expects parameter 1 to be object, int given in %sspl_object_id.php on line %d
|
|
NULL
|
|
|
|
Warning: spl_object_id() expects exactly 1 parameter, 0 given in %sspl_object_id.php on line %d
|
|
NULL
|
|
bool(false)
|