3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/1000(\d+)1500/mi'; $str = '10001212121212121500 100012121500 10001500'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result $expected = []; foreach($matches as $match){ $expected[] = $match[1]; } print_r($expected); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/8TiWH
function name:  (null)
number of ops:  21
compiled vars:  !0 = $re, !1 = $str, !2 = $matches, !3 = $expected, !4 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2F1000%28%5Cd%2B%291500%2Fmi'
    3     1        ASSIGN                                                   !1, '10001212121212121500%0A%0A100012121500%0A%0A10001500'
    9     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        SEND_VAL                                                 2
          7        SEND_VAL                                                 0
          8        DO_ICALL                                                 
   13     9        ASSIGN                                                   !3, <array>
   14    10      > FE_RESET_R                                       $9      !2, ->16
         11    > > FE_FETCH_R                                               $9, !4, ->16
   15    12    >   FETCH_DIM_R                                      ~11     !4, 1
         13        ASSIGN_DIM                                               !3
         14        OP_DATA                                                  ~11
   14    15      > JMP                                                      ->11
         16    >   FE_FREE                                                  $9
   17    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
   19    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.73 ms | 999 KiB | 15 Q