3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = nil; if(empty($a)) $a = "123"; end; echo $a;
Output for 7.2.0 - 7.2.6
Warning: Use of undefined constant nil - assumed 'nil' (this will throw an Error in a future version of PHP) in /in/hoZu5 on line 2 Warning: Use of undefined constant end - assumed 'end' (this will throw an Error in a future version of PHP) in /in/hoZu5 on line 5 nil
Output for 5.3.20 - 7.1.20
Notice: Use of undefined constant nil - assumed 'nil' in /in/hoZu5 on line 2 Notice: Use of undefined constant end - assumed 'end' in /in/hoZu5 on line 5 nil