3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassLoader { private $classMap = 'Class Map'; } $loader = new ClassLoader; $func_without_closure_bind = function() use ($loader) { var_dump($loader->classMap); }; $func_with_closure_bind = Closure::bind($func_without_closure_bind, null, ClassLoader::class); $func_with_closure_bind(); //$func_without_closure_bind(); var_dump($laoder);
Output for git.master, git.master_jit, rfc.property-hooks
string(9) "Class Map" Warning: Undefined variable $laoder in /in/LXTap on line 17 NULL

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