3v4l.org

run code in 500+ PHP versions simultaneously
<?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());
Output for 8.4.10
object(C1)#1 (1) { ["foo"]=> uninitialized(mixed) ["foo"]=> int(1) }
Output for 8.3.5
Fatal error: Cannot use the abstract modifier on a property in /in/AupSE on line 4
Process exited with code 255.

preferences:
41.73 ms | 493 KiB | 3 Q