3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $searchReplaceArray = array( '&#038;' => '&', ); $result = str_replace( array_keys($searchReplaceArray), array_values($searchReplaceArray), $string ); $string = "aaaa &#038; aaaa"; echo $result; $string = "bbbb &#038; bbbb"; echo $result;
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: string in /in/l0KtQ on line 6
Output for 5.1.0 - 5.6.21, hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: string in /in/l0KtQ on line 10
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: string in /in/l0KtQ on line 9
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: string in /in/l0KtQ on line 9