mirror of
https://github.com/php/php-src.git
synced 2026-04-17 04:51:03 +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".
15 lines
227 B
PHP
15 lines
227 B
PHP
--TEST--
|
|
Literal compaction should take method calls on literals into account
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
(42)->foo();
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Call to a member function foo() on int
|