3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = 'q|aaa/aaa|bbb/bbb|ccc/ccc'; $pattern = '~ (?!\A) \| \K [^|/]+ / [^|/]+ (?: \z (*:END) )? | \A [^|/]+ ~Ax'; if (preg_match_all($pattern, $s, $m) && isset($m['MARK']) ) { $result = $m[0]; print_r($result); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 10
filename:       /in/HrC7R
function name:  (null)
number of ops:  17
compiled vars:  !0 = $s, !1 = $pattern, !2 = $m, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'q%7Caaa%2Faaa%7Cbbb%2Fbbb%7Cccc%2Fccc'
    5     1        ASSIGN                                                   !1, '%7E+%28%3F%21%5CA%29+%5C%7C+%5CK+%5B%5E%7C%2F%5D%2B++%2F+%5B%5E%7C%2F%5D%2B++%28%3F%3A+%5Cz+%28%2A%3AEND%29+%29%3F+%7C+%5CA+%5B%5E%7C%2F%5D%2B+%7EAx'
    7     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                         $6      
          7      > JMPZ_EX                                          ~7      $6, ->10
          8    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~8      !2, 'MARK'
          9        BOOL                                             ~7      ~8
         10    > > JMPZ                                                     ~7, ->16
    8    11    >   FETCH_DIM_R                                      ~9      !2, 0
         12        ASSIGN                                                   !3, ~9
    9    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                                 
   10    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.41 ms | 998 KiB | 15 Q