3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "12&Shoes&28&Jewelry&30&Watch&96&Beauty&98&Kids&Baby"; var_export( preg_match_all( '/(\d+)&([a-z]+(?:&[a-z]+)?)/i', $string, $m ) ? array_combine($m[1], $m[2]) : [] );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PqDQZ
function name:  (null)
number of ops:  20
compiled vars:  !0 = $string, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '12%26Shoes%2628%26Jewelry%2630%26Watch%2696%26Beauty%2698%26Kids%26Baby'
    5     1        INIT_FCALL                                               'var_export'
    6     2        INIT_FCALL                                               'preg_match_all'
    7     3        SEND_VAL                                                 '%2F%28%5Cd%2B%29%26%28%5Ba-z%5D%2B%28%3F%3A%26%5Ba-z%5D%2B%29%3F%29%2Fi'
    8     4        SEND_VAR                                                 !0
    9     5        SEND_REF                                                 !1
    6     6        DO_ICALL                                         $3      
    9     7      > JMPZ                                                     $3, ->16
   11     8    >   INIT_FCALL                                               'array_combine'
          9        FETCH_DIM_R                                      ~4      !1, 1
         10        SEND_VAL                                                 ~4
         11        FETCH_DIM_R                                      ~5      !1, 2
         12        SEND_VAL                                                 ~5
         13        DO_ICALL                                         $6      
         14        QM_ASSIGN                                        ~7      $6
         15      > JMP                                                      ->17
   12    16    >   QM_ASSIGN                                        ~7      <array>
         17    >   SEND_VAL                                                 ~7
    5    18        DO_ICALL                                                 
   13    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.61 ms | 1012 KiB | 16 Q