3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $targets = array('\\','/',':','*','?','"','<','>','|','-', ' '); $replace = '_'; $samples = array( 'c:\Windows\win.com', '/chat/stackoverflow/com/rooms/11.php', 'I like goats', ' ', 'OVER NINE THOUSAAAAAAAAAAAANNNNNDDDDDDDDDDDAAAH!!!!!!!!!!!!!!!!!!!!!!!!!!1111 ); $results = array(); foreach ($samples as $s) { print $s."\n".str_replace($targets, $replace, $s)."\n\n"; }
Output for 5.4.0 - 5.5.12
Parse error: syntax error, unexpected ''OVER NINE THOUSAAAAAAAAAAAANN' (T_ENCAPSED_AND_WHITESPACE), expecting ')' in /in/bRk7T on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ')' in /in/bRk7T on line 11
Process exited with code 255.