3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $tweet = "hello world #dontremoveme foobar http://example.com/#dontremoveme #remove #removeme #removeüäüö"; #$res = preg_replace("/ #\p{L}+\b(?!\s+\p{L})/u", '', $tweet); $res = preg_replace("/ #\w+/u", '', $tweet); echo $res,"\n";
based on XrRLq
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/1qsOZ
function name:  (null)
number of ops:  10
compiled vars:  !0 = $tweet, !1 = $res
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, 'hello+world+%23dontremoveme+foobar+http%3A%2F%2Fexample.com%2F%23dontremoveme+%23remove+%23removeme+%23remove%C3%BC%C3%A4%C3%BC%C3%B6'
   5     1        INIT_FCALL                                               'preg_replace'
         2        SEND_VAL                                                 '%2F+%23%5Cw%2B%2Fu'
         3        SEND_VAL                                                 ''
         4        SEND_VAR                                                 !0
         5        DO_ICALL                                         $3      
         6        ASSIGN                                                   !1, $3
   6     7        ECHO                                                     !1
         8        ECHO                                                     '%0A'
         9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0