3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $search = array('Ā', 'ā', 'Š', 'š', 'Ž', 'ž'); $replace = array('A', 'a', 'S', 's', 'Ž', ž); foreach($data as $key => $value){ $value = str_replace($search, $replace, $value); } print_r($data);
Output for 7.2.0 - 7.2.6
Warning: Use of undefined constant ž - assumed 'ž' (this will throw an Error in a future version of PHP) in /in/t2ggc on line 4 Notice: Undefined variable: data in /in/t2ggc on line 5 Warning: Invalid argument supplied for foreach() in /in/t2ggc on line 5 Notice: Undefined variable: data in /in/t2ggc on line 9
Output for 5.5.0 - 7.1.20
Notice: Use of undefined constant ž - assumed 'ž' in /in/t2ggc on line 4 Notice: Undefined variable: data in /in/t2ggc on line 5 Warning: Invalid argument supplied for foreach() in /in/t2ggc on line 5 Notice: Undefined variable: data in /in/t2ggc on line 9
Output for 5.2.3 - 5.4.45
Warning: Invalid argument supplied for foreach() in /in/t2ggc on line 5
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.2.2
<br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/t2ggc</b> on line <b>5</b><br />
Output for 4.3.11