3v4l.org

run code in 300+ PHP versions simultaneously
<?php class BadAss { function __set($name, $value) { $this->{self::confuse($name)} = $value; } private static function confuse($name) { return substr($name, 0, 4) !== 'bad_' ? "bad_$name" : $name; } } $o = new BadAss; $o->name = 'value'; var_dump($o);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property BadAss::$bad_name is deprecated in /in/uhclB on line 5 object(BadAss)#1 (1) { ["bad_name"]=> string(5) "value" }

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