Closed
Description
Description
The following code:
class C {
public $prop {
set => $value;
}
}
$nonLazy = new C;
$lazy = (new ReflectionClass(C::class))->newLazyProxy(function () {
echo "init\n";
return new C;
});
function foo(C $c) {
$c->prop = 1;
var_dump($c->prop);
}
foo($nonLazy);
foo($lazy);
Resulted in this output:
int(1)
int(1)
But I expected this output instead:
int(1)
init
int(1)
PHP Version
8.4
Operating System
No response