3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo($a = A) { echo $a; } foo(1); foo(); // Use of undefined constant A const A = 1; foo();
Output for 7.2.0 - 7.3.0beta1
1 Warning: Use of undefined constant A - assumed 'A' (this will throw an Error in a future version of PHP) in /in/cJFf8 on line 4 A1
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.20
1 Notice: Use of undefined constant A - assumed 'A' in /in/cJFf8 on line 4 A1