mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
315f40942b
Currently, CE_CACHE on strings is only used with opcache interned strings. This patch extends usage to non-opcache interned strings as well. This means that most type strings can now make use of CE_CACHE even if opcache is not loaded, which allows us to remove TYPE_HAS_CE kind, and fix some discrepancies depending on whether a type stores a resolved or non-resolved name. There are two cases where CE_CACHE will not be used: * When opcache is not used and a permanent interned string (that is not an internal class name) is used as a type name during the request. In this case we can't allocate a map_ptr index for the permanent string, as it would be not be in the permanent map_ptr index space. * When opcache is used but the script is not cached (e.g. eval'd code or opcache full). If opcache is used, we can't allocate additional map_ptr indexes at runtime, because they may conflict with indexes allocated by opcache. In these two cases we would end up not using CE caching for property types (argument/return types still have the separate cache slot).
21 lines
374 B
PHP
21 lines
374 B
PHP
--TEST--
|
|
method overloading with different method signature
|
|
--FILE--
|
|
<?php
|
|
|
|
class test {
|
|
function foo(Test $arg) {}
|
|
}
|
|
|
|
class test2 extends test {
|
|
function foo(Test $arg) {}
|
|
}
|
|
|
|
class test3 extends test {
|
|
function foo(Test3 $arg) {}
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Declaration of test3::foo(Test3 $arg) must be compatible with test::foo(Test $arg) in %s on line %d
|