3v4l.org

run code in 300+ PHP versions simultaneously
<?php function($a = 1) use (&$a) {}; var_dump($a); // NULL <---- Why? function (&$b = 1) {}; var_dump($b); // PHP Notice: Undefined variable: b
Output for 7.1.0 - 7.1.8
Fatal error: Cannot use lexical variable $a as a parameter name in /in/2hGEk on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20
NULL Notice: Undefined variable: b in /in/2hGEk on line 7 NULL

preferences:
152.16 ms | 1207 KiB | 6 Q