Open
Description
Description
The following code (https://3v4l.org/AupSE#v8.4.10):
<?php
abstract class GP {
public abstract mixed $foo { get; }
}
class P extends GP {
public mixed $foo;
public function x() {
++$this->foo;
return $this;
}
}
class C1 extends P {
public mixed $foo = 0 { set { parent::$foo::set($value); } }
}
var_dump((new C1)->x());
Resulted in this output:
object(C1)#1 (1) {
["foo"]=>
uninitialized(mixed)
["foo"]=>
int(1)
}
But I expected this output instead:
object(C1)#1 (1) {
["foo"]=>
int(1)
}
PHP Version
PHP 8.4.10
Operating System
No response