3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public function __set($property, $value) { $this->$property = $value; } public function __get($property){ return $this->$property; } } $user = new User; var_dump($user->fname = 'Alejandro'); var_dump($user->fname);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property User::$fname is deprecated in /in/u6Y5R on line 8 string(9) "Alejandro" string(9) "Alejandro"

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