3v4l.org

run code in 300+ PHP versions simultaneously
<?php function safeEval($haystack,$needle) { str_ireplace($needle[],"' '",$haystack[]); //$return = $haystack; return eval($haystack); //return; } $string = array("Hello","drop","Kyle"), array("Drop"); safeEval($string);
Output for 5.3.0 - 5.3.24, 5.4.0 - 5.4.15
Fatal error: Cannot use [] for reading in oaDpE on line 4
Process exited with code 255.
Output for 5.3.25
Fatal error: Cannot use [] for reading in /in/QjldI on line 4
Process exited with code 255.

preferences:
179.06 ms | 1395 KiB | 49 Q