3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = ["name,firstname,Bob", "name,lastname,Dylan"]; $result = []; foreach ($strings as $csv) { [$level1, $level2, $result[$level1][$level2]] = str_getcsv($csv); } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/DDgAi
function name:  (null)
number of ops:  22
compiled vars:  !0 = $strings, !1 = $result, !2 = $csv, !3 = $level1, !4 = $level2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2      > FE_RESET_R                                       $7      !0, ->17
          3    > > FE_FETCH_R                                               $7, !2, ->17
    6     4    >   INIT_FCALL                                               'str_getcsv'
          5        SEND_VAR                                                 !2
          6        DO_ICALL                                         $8      
          7        FETCH_LIST_R                                     $9      $8, 0
          8        ASSIGN                                                   !3, $9
          9        FETCH_LIST_R                                     $11     $8, 1
         10        ASSIGN                                                   !4, $11
         11        FETCH_LIST_R                                     $13     $8, 2
         12        FETCH_DIM_W                                      $14     !1, !3
         13        ASSIGN_DIM                                               $14, !4
         14        OP_DATA                                                  $13
         15        FREE                                                     $8
    5    16      > JMP                                                      ->3
         17    >   FE_FREE                                                  $7
    8    18        INIT_FCALL                                               'var_export'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.63 ms | 1003 KiB | 15 Q