3v4l.org

run code in 200+ 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 - 7.2.6
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