Closed
Description
Description
The following code:
<?php
class C {
public function __get($name) {
return $this;
}
}
function test() {
$x = (new C)->bar;
var_dump($x);
}
test();
Resulted in this output:
php: Zend/zend_objects_API.c:162: zend_objects_store_del: Assertion `zend_gc_refcount(&(object)->gc) == 0' failed.
But I expected this output instead:
object(C)#%d (0) {
}
The problem here is that we don't create a new definition for op1 for FETCH_OBJ. This was discovered during development of GH-17130.
PHP Version
PHP 8.2+
Operating System
No response