3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/^# cat B.*?(cat).*?(ugly).*?^# cat C$/ms'; $str = '# cat A the cat is very cute. # cat B the cat is very ugly. # cat C the cat is very good. #'; preg_match_all($re, $str, $matches, PREG_SET_ORDER); array_shift($matches[0]); print_r($matches[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UZOQa
function name:  (null)
number of ops:  17
compiled vars:  !0 = $re, !1 = $str, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%5E%23+cat+B.%2A%3F%28cat%29.%2A%3F%28ugly%29.%2A%3F%5E%23+cat+C%24%2Fms'
    4     1        ASSIGN                                                   !1, '%23+cat+A%0A%0Athe+cat+is%0Avery+cute.%0A%0A%23+cat+B%0A%0Athe+cat+is%0Avery+ugly.%0A%0A%23+cat+C%0A%0Athe+cat+is%0Avery+good.%0A%0A%23'
   21     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        SEND_VAL                                                 2
          7        DO_ICALL                                                 
   22     8        INIT_FCALL                                               'array_shift'
          9        FETCH_DIM_W                                      $6      !2, 0
         10        SEND_REF                                                 $6
         11        DO_ICALL                                                 
   23    12        INIT_FCALL                                               'print_r'
         13        FETCH_DIM_R                                      ~8      !2, 0
         14        SEND_VAL                                                 ~8
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
249.77 ms | 1003 KiB | 16 Q