3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $secret = 'I actually prefer coding with Go'; public function getClosure() : closure { return function() { return $this->secret; }; } public function dontLeakMyStuff() { return create_function('', 'return $this->secret;'); } } $foo = new Foo(); $closure = $foo->getClosure(); var_dump($closure()); $function = $foo->dontLeakMyStuff(); var_dump($function());
Output for git.master, git.master_jit, rfc.property-hooks
string(32) "I actually prefer coding with Go" Fatal error: Uncaught Error: Call to undefined function create_function() in /in/sd9ee:14 Stack trace: #0 /in/sd9ee(22): Foo->dontLeakMyStuff() #1 {main} thrown in /in/sd9ee on line 14
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:
64.72 ms | 405 KiB | 5 Q