3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '1 foo 2 ba_r 3 foo bar 4 fo-o'; preg_match_all( '/(\d+)\s+(.*)$/m', $input, $matches, PREG_SET_ORDER); $data = array(); foreach( $matches as $match) { list( , $num, $word) = $match; $data[] = array( $num, $word); } print_r( $data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 21
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/vIIEq
function name:  (null)
number of ops:  26
compiled vars:  !0 = $input, !1 = $matches, !2 = $data, !3 = $match, !4 = $num, !5 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '1+foo%0A2+++ba_r%0A3++foo+bar%0A4+++fo-o'
    6     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%28%5Cd%2B%29%5Cs%2B%28.%2A%29%24%2Fm'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        SEND_VAL                                                 2
          6        DO_ICALL                                                 
    8     7        ASSIGN                                                   !2, <array>
    9     8      > FE_RESET_R                                       $9      !1, ->21
          9    > > FE_FETCH_R                                               $9, !3, ->21
   10    10    >   QM_ASSIGN                                        ~10     !3
         11        FETCH_LIST_R                                     $11     ~10, 1
         12        ASSIGN                                                   !4, $11
         13        FETCH_LIST_R                                     $13     ~10, 2
         14        ASSIGN                                                   !5, $13
         15        FREE                                                     ~10
   11    16        INIT_ARRAY                                       ~16     !4
         17        ADD_ARRAY_ELEMENT                                ~16     !5
         18        ASSIGN_DIM                                               !2
         19        OP_DATA                                                  ~16
    9    20      > JMP                                                      ->9
         21    >   FE_FREE                                                  $9
   13    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.71 ms | 1387 KiB | 17 Q