php-src/Zend/tests/class_alias_006.phpt
Niels Dossche 821fc55a68
Implement GH-9826: Make class_alias() work with internal classes (#10483)
We can't increase the refcount of internal classes during request time.
To work around this problem we simply don't refcount aliases anymore and
add a check in the destruction to skip aliases entirely.
There were also some checks which checked for an alias implicitly by
comparing the refcount, these have been replaced by checking the type of
the zval instead.
2023-02-22 11:47:32 +01:00

14 lines
180 B
PHP

--TEST--
Testing creation of alias to an internal class
--FILE--
<?php
class_alias('stdclass', 'foo');
$foo = new foo();
var_dump($foo);
?>
--EXPECT--
object(stdClass)#1 (0) {
}