3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $search = array('Ā', 'ā', 'Š', 'š', 'Ž', 'ž'); $replace = array('A', 'a', 'S', 's', 'Z', 'z'); foreach($data as $key => $value){ $value = str_replace($search, $replace, $value); } print_r($data);
Output for 5.5.0 - 7.1.0
Notice: Undefined variable: data in /in/Jv8UZ on line 5 Warning: Invalid argument supplied for foreach() in /in/Jv8UZ on line 5 Notice: Undefined variable: data in /in/Jv8UZ on line 9
Output for 5.2.3 - 5.4.45
Warning: Invalid argument supplied for foreach() in /in/Jv8UZ 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/Jv8UZ</b> on line <b>5</b><br />
Output for 4.3.11