mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
The assertion is imprecise now, and the code assumed that from the moment an internal class was encountered that there were only internal classes remaining. This is wrong now, and we still have to continue if we encounter an internal class. We can only skip the remaining iterations if the entry in the hash table is not an alias. Closes GH-18575.
28 lines
561 B
PHP
28 lines
561 B
PHP
--TEST--
|
|
GH-18567 (Preloading with internal class alias triggers assertion failure)
|
|
--INI--
|
|
opcache.enable=1
|
|
opcache.enable_cli=1
|
|
opcache.preload={PWD}/preload_gh18567.inc
|
|
--EXTENSIONS--
|
|
opcache
|
|
--SKIPIF--
|
|
<?php
|
|
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
abstract class Test implements MyStringable {
|
|
}
|
|
$rc = new ReflectionClass(Test::class);
|
|
var_dump($rc->getInterfaces());
|
|
?>
|
|
--EXPECT--
|
|
array(1) {
|
|
["Stringable"]=>
|
|
object(ReflectionClass)#2 (1) {
|
|
["name"]=>
|
|
string(10) "Stringable"
|
|
}
|
|
}
|