3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ private $id='iddebut'; private $nomTest='nomdebut'; public function __call($name, $args) { echo "\n----".$name; var_dump($args); } public function __get($name) { echo "\ngetting----".$name; return $this->$name; } public function __set($name, $args) { echo "\nsetting".$name; var_dump($args); $this->$name=$args; return $this; ///fdf } } $a = new A(); echo "\n".$a->getId('ceci est un argument'); echo "\n".$a->id; echo "\n".$a->nomTest; $a->id = 'nouvel id'; $a->nomTest = 'nouvel id';
Output for git.master, git.master_jit, rfc.property-hooks
----getIdarray(1) { [0]=> string(20) "ceci est un argument" } getting----id iddebut getting----nomTest nomdebut settingidstring(9) "nouvel id" settingnomTeststring(9) "nouvel id"

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:
99.32 ms | 401 KiB | 8 Q