3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = '1234'; try{ $testcopy = $test; $testcopy = str_replace( '1' ); $test = $testcopy; }catch(Exception $e){ } var_dump ($test);

preferences:
32.51 ms | 402 KiB | 5 Q