3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/^.*\bimportant\h+\d.*\R*/mi'; $string = 'important 1 some words ...... IMPORTANT 34 some words ...... important 99 some words ......'; $result = preg_replace($pattern, '', $string); echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b3QXT
function name:  (null)
number of ops:  10
compiled vars:  !0 = $pattern, !1 = $string, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%5E.%2A%5Cbimportant%5Ch%2B%5Cd.%2A%5CR%2A%2Fmi'
    4     1        ASSIGN                                                   !1, 'important+1%0Asome+words+......%0AIMPORTANT+34%0Asome+words+......%0Aimportant+99%0Asome+words+......'
   11     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
   13     8        ECHO                                                     !2
   14     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.31 ms | 1009 KiB | 14 Q