3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Sorry that meant to say hungover and feeling sorry for myself. 😩"; $str = "I can spend upto £40 a week on cigarettes ... £160 a month. I could go on holiday for that ... ☀ðŸ˜" $pattern = '/[😩]/i'; $str = preg_replace($pattern, '', $str); echo $str;
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '$pattern' (T_VARIABLE) in /in/iZY0J on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/iZY0J on line 5
Process exited with code 255.

preferences:
216.45 ms | 1394 KiB | 61 Q