3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = array( '#tag', 'text #tag text', 'text #tag', 'text#tag', ); $res = preg_filter('/\B#(\S{1,24}+)/u', '#<$1>' , $var); print_r($res); echo preg_replace('/\B#(\S{1,24}+)/u', '#<$1>' , 'text#tag').
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected end of file in /in/kYnAQ on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end in /in/kYnAQ on line 10
Process exited with code 255.

preferences:
190.77 ms | 1395 KiB | 64 Q