3v4l.org

run code in 300+ PHP versions simultaneously
<?php $groups="group1, group2, group3,,foo"; $functions="member, member, admin,,bar"; $keys = preg_split('(\s*,+\s*)', $groups); $values = preg_split('(\s*,+\s*)', $functions); $array = array_combine($keys, $values); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ib5a3
function name:  (null)
number of ops:  21
compiled vars:  !0 = $groups, !1 = $functions, !2 = $keys, !3 = $values, !4 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'group1%2C+group2%2C+group3%2C%2Cfoo'
    3     1        ASSIGN                                                   !1, 'member%2C+member%2C+admin%2C%2Cbar'
    4     2        INIT_FCALL                                               'preg_split'
          3        SEND_VAL                                                 '%28%5Cs%2A%2C%2B%5Cs%2A%29'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !2, $7
    5     7        INIT_FCALL                                               'preg_split'
          8        SEND_VAL                                                 '%28%5Cs%2A%2C%2B%5Cs%2A%29'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !3, $9
    6    12        INIT_FCALL                                               'array_combine'
         13        SEND_VAR                                                 !2
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $11     
         16        ASSIGN                                                   !4, $11
    7    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !4
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.78 ms | 934 KiB | 20 Q