3v4l.org

run code in 500+ PHP versions simultaneously
<?php $text = "11 a b 13 begin t 899 y 50 f end 91 h"; var_export(preg_match_all('~(?:begin|\G(?!^))(?:(?!end)\D)+\K\d+~s', $text, $out) ? $out[0] : 'no matches');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K8o17
function name:  (null)
number of ops:  15
compiled vars:  !0 = $text, !1 = $out
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '11%0Aa%0Ab%0A13%0Abegin%0At%0A899%0Ay%0A50%0Af%0Aend%0A91%0Ah'
   15     1        INIT_FCALL                                                   'var_export'
          2        INIT_FCALL                                                   'preg_match_all'
          3        SEND_VAL                                                     '%7E%28%3F%3Abegin%7C%5CG%28%3F%21%5E%29%29%28%3F%3A%28%3F%21end%29%5CD%29%2B%5CK%5Cd%2B%7Es'
          4        SEND_VAR                                                     !0
          5        SEND_REF                                                     !1
          6        DO_ICALL                                             $3      
          7      > JMPZ                                                         $3, ->11
          8    >   FETCH_DIM_R                                          ~4      !1, 0
          9        QM_ASSIGN                                            ~5      ~4
         10      > JMP                                                          ->12
         11    >   QM_ASSIGN                                            ~5      'no+matches'
         12    >   SEND_VAL                                                     ~5
         13        DO_ICALL                                                     
         14      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
235.74 ms | 2532 KiB | 15 Q