3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public ?int $a; public ?string $b; } $c = new C(); $c->a = &$prop; $c->b = &$prop; $prop = '43';
Output for git.master_jit, git.master
Fatal error: Uncaught TypeError: Cannot assign string to reference held by property C::$a of type ?int and property C::$b of type ?string, as this would result in an inconsistent type conversion in /in/defVI:11 Stack trace: #0 {main} thrown in /in/defVI on line 11
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:
26.01 ms | 405 KiB | 5 Q