3v4l.org

run code in 300+ 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))*?\K\d+~', $text, $out) ? $out : 'no matches');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jmtaR
function name:  (null)
number of ops:  14
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%29%2A%3F%5CK%5Cd%2B%7E'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                         $3      
          7      > JMPZ                                                     $3, ->10
          8    >   QM_ASSIGN                                        ~4      !1
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~4      'no+matches'
         11    >   SEND_VAL                                                 ~4
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.27 ms | 1394 KiB | 17 Q