3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SystemInfo { function __get($name) { if ($name == 'info') { return [ 'foo' => 'bar', ]; } } } $module = (object) [ 'name' => 'foo', 'info' => [ 'foo' => 'bar', ] ]; print_r([$module->name, $module->info, $module->info['foo']]); $module = new SystemInfo(); $module->name = 'foo'; print_r([$module->name, $module->info, $module->info['foo']]);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => foo [1] => Array ( [foo] => bar ) [2] => bar ) Deprecated: Creation of dynamic property SystemInfo::$name is deprecated in /in/ZjBkH on line 23 Array ( [0] => foo [1] => Array ( [foo] => bar ) [2] => bar )

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:
51.03 ms | 402 KiB | 8 Q