3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); if($lang == 'en') { $langar = $langen; } elseif($lang == 'ne') { $langar = $langne; } else { $langar = $langen; }
Output for 5.3.0 - 5.6.28, hhvm-3.10.0, 7.0.0 - 7.1.0
Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /in/B3pTG on line 2 Notice: Undefined variable: langen in /in/B3pTG on line 8
Output for hhvm-3.12.0
Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /in/B3pTG on line 2 Warning: substr() expects parameter 1 to be string, null given in /in/B3pTG on line 2 Notice: Undefined variable: langen in /in/B3pTG on line 8
Output for 5.0.4 - 5.2.17
Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /in/B3pTG on line 2 Notice: Undefined variable: langen in /in/B3pTG on line 8
Output for 4.3.0 - 5.0.3
Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /in/B3pTG on line 2 Notice: Undefined variable: langen in /in/B3pTG on line 8