3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $a[] = array(1, 2); $a[] = array(3, 4); $a[] = array(5, 6); $file = new splfileobject('/tmp/stdfile.txt', 'w+'); $file->fputcsv($a); var_dump(file_get_contents('/tmp/stdfile.txt'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kuGq9
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  <array>
    5     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  <array>
    6     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  <array>
    8     7        NEW                                              $6      'splfileobject'
          8        SEND_VAL_EX                                              '%2Ftmp%2Fstdfile.txt'
          9        SEND_VAL_EX                                              'w%2B'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $6
    9    12        INIT_METHOD_CALL                                         !1, 'fputcsv'
         13        SEND_VAR_EX                                              !0
         14        DO_FCALL                                      0          
   11    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'file_get_contents'
         17        SEND_VAL                                                 '%2Ftmp%2Fstdfile.txt'
         18        DO_ICALL                                         $10     
         19        SEND_VAR                                                 $10
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.22 ms | 1395 KiB | 17 Q