3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'data' => [ 0 => 2678, 1 => 2378, ], 'active' => [ 0 => 866, 1 => 111, ], ]; $fp = fopen('php://stdout', 'w'); fputcsv($fp, array_keys($array)); $array = array_map(null, ...array_values($array)); foreach ($array as $row) { fputcsv($fp, $row); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 29
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 29
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/AoRcQ
function name:  (null)
number of ops:  31
compiled vars:  !0 = $array, !1 = $fp, !2 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'fopen'
          2        SEND_VAL                                                 'php%3A%2F%2Fstdout'
          3        SEND_VAL                                                 'w'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   16     6        INIT_FCALL                                               'fputcsv'
          7        SEND_VAR                                                 !1
          8        INIT_FCALL                                               'array_keys'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
   18    13        INIT_FCALL                                               'array_map'
         14        SEND_VAL                                                 null
         15        INIT_FCALL                                               'array_values'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $8      
         18        SEND_UNPACK                                              $8
         19        CHECK_UNDEF_ARGS                                         
         20        DO_ICALL                                         $9      
         21        ASSIGN                                                   !0, $9
   20    22      > FE_RESET_R                                       $11     !0, ->29
         23    > > FE_FETCH_R                                               $11, !2, ->29
   21    24    >   INIT_FCALL                                               'fputcsv'
         25        SEND_VAR                                                 !1
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                                 
   20    28      > JMP                                                      ->23
         29    >   FE_FREE                                                  $11
   22    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.11 ms | 1016 KiB | 18 Q