3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Prototype { public function __call($method,$args) { $f = $this->$method; return $f(); } } $object = new Prototype; $object->monday = function(){ return "monday"; }; $object->hello_monday = function(){ echo "what a beautiful ".$monday()."!"; }; $object->{"hello_monday"}();
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property Prototype::$monday is deprecated in /in/XgOhS on line 12 Deprecated: Creation of dynamic property Prototype::$hello_monday is deprecated in /in/XgOhS on line 15 Warning: Undefined variable $monday in /in/XgOhS on line 16 Fatal error: Uncaught Error: Value of type null is not callable in /in/XgOhS:16 Stack trace: #0 /in/XgOhS(7): {closure}() #1 /in/XgOhS(20): Prototype->__call('hello_monday', Array) #2 {main} thrown in /in/XgOhS on line 16
Process exited with code 255.

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