3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $langs = " ".$_SERVER['HTTP_ACCEPT_LANGUAGE']; //verfuegbare Sprachen in Array $begruessungen = array('de' => 'Willkommen', 'es' => 'Bienvenido', 'en' => 'Welcome', 'fr' => 'Bienvenue'); //ermitteln der positionen foreach($begruessungen as $code => $gruss) { $pos = strpos($langs, $code); if(intval($pos) != 0) { $position[$code] = intval($pos); } } ?>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /in/aueee on line 2
Output for 4.3.0 - 5.2.17
Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /in/aueee on line 2