3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = array ( 'a' => array ( 0 => 111, 1 => 222, 2 => 333, 3 => 444, ), 'b' => array ( 0 => 555, 1 => 666, 2 => 777, 3 => 888, ), 'c' => array ( 0 => 999, 1 => 000, 2 => 111, 3 => 222, ), ); $lastRowNumber = array_key_last($data['a']); $columns = array_keys($data); for ( $rowNumber = 0; $rowNumber <= $lastRowNumber; $rowNumber++ ) { $csvRow = []; foreach ( $columns as $columnKey ) { $csvRow[] = $data[$columnKey][$rowNumber]; } echo implode(',', $csvRow), PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 12
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 12
Branch analysis from position: 27
Branch analysis from position: 12
Branch analysis from position: 20
filename:       /in/P5rtU
function name:  (null)
number of ops:  28
compiled vars:  !0 = $data, !1 = $lastRowNumber, !2 = $columns, !3 = $rowNumber, !4 = $csvRow, !5 = $columnKey
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   28     1        INIT_FCALL                                                   'array_key_last'
          2        FETCH_DIM_R                                          ~7      !0, 'a'
          3        SEND_VAL                                                     ~7
          4        DO_ICALL                                             $8      
          5        ASSIGN                                                       !1, $8
   29     6        INIT_FCALL                                                   'array_keys'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                             $10     
          9        ASSIGN                                                       !2, $10
   31    10        ASSIGN                                                       !3, 0
         11      > JMP                                                          ->25
   32    12    >   ASSIGN                                                       !4, <array>
   33    13      > FE_RESET_R                                           $14     !2, ->20
         14    > > FE_FETCH_R                                                   $14, !5, ->20
   34    15    >   FETCH_DIM_R                                          ~16     !0, !5
         16        FETCH_DIM_R                                          ~17     ~16, !3
         17        ASSIGN_DIM                                                   !4
         18        OP_DATA                                                      ~17
   33    19      > JMP                                                          ->14
         20    >   FE_FREE                                                      $14
   36    21        FRAMELESS_ICALL_2                implode             ~18     '%2C', !4
         22        ECHO                                                         ~18
         23        ECHO                                                         '%0A'
   31    24        PRE_INC                                                      !3
         25    >   IS_SMALLER_OR_EQUAL                                          !3, !1
         26      > JMPNZ                                                        ~20, ->12
   37    27    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
187.41 ms | 1483 KiB | 15 Q