3v4l.org

run code in 300+ PHP versions simultaneously
<?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.18 - 5.4.19
Fatal error: Call-time pass-by-reference has been removed in /in/MctYX on line 5
Process exited with code 255.
Output for 5.4.0 - 5.4.17
Fatal error: Call-time pass-by-reference has been removed in /in/2JDPP on line 5
Process exited with code 255.
Output for 5.3.28 - 5.3.29
Deprecated: Call-time pass-by-reference has been deprecated in /in/MctYX on line 5 a
Output for 5.3.0 - 5.3.27
Deprecated: Call-time pass-by-reference has been deprecated in /in/2JDPP on line 5 a

preferences:
178.13 ms | 1399 KiB | 57 Q