3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { public $a; public ?int $b = 1; function clean() { unset($this->a); unset($this->b); } } $x = new X; $x->clean(); var_dump($x->a); var_dump($x->b); ?>
Output for git.master, git.master_jit
Warning: Undefined property: X::$a in /in/SU2SE on line 16 NULL Fatal error: Uncaught Error: Typed property X::$b must not be accessed before initialization in /in/SU2SE:17 Stack trace: #0 {main} thrown in /in/SU2SE on line 17
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
59.88 ms | 876 KiB | 4 Q