3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function a() {echo "a";} $a= 3; $f = "a"; $$f($a); exit; class A { private static function __invke() { echo "a"; }};//function() {}; $a = new A; //$a = function() { echo "b";}; $ref = new ReflectionMethod($a, '__invoke'); var_dump(is_object($a), is_callable($a)); $a(); $ref->setAccessible(true); $b = 3; $ref->invoke($a, &$b); exit; function ab($a) { } $b = 3; a($b);
Output for 5.4.0 - 5.4.19
Fatal error: Call-time pass-by-reference has been removed in /in/cWhiR on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Deprecated: Call-time pass-by-reference has been deprecated in /in/cWhiR on line 16 Fatal error: Function name must be a string in /in/cWhiR on line 5
Process exited with code 255.