3v4l.org

run code in 150+ 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 5.5.0 - 5.6.28, 7.0.0 - 7.1.0
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 hhvm-3.10.0 - 3.12.0
Notice: Use of undefined constant ž - assumed 'ž' in /in/t2ggc on line 4 Notice: Undefined variable: data in /in/t2ggc on line 7 Warning: Invalid argument supplied for foreach() in /in/t2ggc on line 7 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