3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '[Links label="my_label" url="my_url" external="other_value"]'; preg_match("/ (.*?)=\"(.*?)\" (.*?)=\"(.*?)\" (.*?)=\"(.*?)\"/", $str, $match); unset($match[0]); foreach(array_chunk($match,2) as $m){ $res[$m[0]] = $m[1]; } var_dump($res);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/H1qGD
function name:  (null)
number of ops:  23
compiled vars:  !0 = $str, !1 = $match, !2 = $m, !3 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5BLinks+label%3D%22my_label%22+url%3D%22my_url%22+external%3D%22other_value%22%5D'
    5     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F+%28.%2A%3F%29%3D%22%28.%2A%3F%29%22+%28.%2A%3F%29%3D%22%28.%2A%3F%29%22+%28.%2A%3F%29%3D%22%28.%2A%3F%29%22%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    7     6        UNSET_DIM                                                !1, 0
    8     7        INIT_FCALL                                               'array_chunk'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 2
         10        DO_ICALL                                         $6      
         11      > FE_RESET_R                                       $7      $6, ->18
         12    > > FE_FETCH_R                                               $7, !2, ->18
    9    13    >   FETCH_DIM_R                                      ~8      !2, 0
         14        FETCH_DIM_R                                      ~10     !2, 1
         15        ASSIGN_DIM                                               !3, ~8
         16        OP_DATA                                                  ~10
    8    17      > JMP                                                      ->12
         18    >   FE_FREE                                                  $7
   12    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.52 ms | 1012 KiB | 16 Q