3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new Obj; $obj->oele['boele'][] = 'foo'; print_r($obj); var_dump($obj->bar); if ( $obj->eh ); $obj->oele['foo'] = 'boele'; print_r($obj); class Obj { function __construct() { $this->foo = 'bar'; } function &__get($name) { $this->$name = null; $var = &$this->$name; switch ( $name ) { case 'bar': $var = 'magic foo'; break; } return $this->$name; } }
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property Obj::$foo is deprecated in /in/FQZEX on line 17 Deprecated: Creation of dynamic property Obj::$oele is deprecated in /in/FQZEX on line 21 Obj Object ( [foo] => bar [oele] => Array ( [boele] => Array ( [0] => foo ) ) ) Deprecated: Creation of dynamic property Obj::$bar is deprecated in /in/FQZEX on line 21 string(9) "magic foo" Deprecated: Creation of dynamic property Obj::$eh is deprecated in /in/FQZEX on line 21 Obj Object ( [foo] => bar [oele] => Array ( [boele] => Array ( [0] => foo ) [foo] => boele ) [bar] => magic foo [eh] => )

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.58 ms | 403 KiB | 8 Q