mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

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.
13 lines
180 B
PHP
13 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) {
|
|
}
|