mirror of
https://github.com/php/php-src.git
synced 2024-12-16 05:15:03 +08:00
821fc55a68
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.
14 lines
180 B
PHP
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) {
|
|
}
|