3v4l.org

run code in 300+ PHP versions simultaneously
<?php $global_obj = null; class my_class { var $value; function my_class() { global $global_obj; $global_obj = &$this; } } $a = new my_class; $a->my_value = 5; $global_obj->my_value = 10; var_dump($a->my_value);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property my_class::$my_value is deprecated in /in/EbuJ0 on line 13 Fatal error: Uncaught Error: Attempt to assign property "my_value" on null in /in/EbuJ0:14 Stack trace: #0 {main} thrown in /in/EbuJ0 on line 14
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:
54.23 ms | 401 KiB | 8 Q