3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new arrayObject(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/CUVV2
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'arrayObject'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    4     4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  <array>
    5     6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  <array>
    6     8        ASSIGN_DIM                                               !0
          9        OP_DATA                                                  <array>
    8    10        NEW                                              $8      'splfileobject'
         11        SEND_VAL_EX                                              '%2Ftmp%2Fstdfile.txt'
         12        SEND_VAL_EX                                              'w%2B'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !1, $8
    9    15        INIT_METHOD_CALL                                         !1, 'fputcsv'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0          
   11    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'file_get_contents'
         20        SEND_VAL                                                 '%2Ftmp%2Fstdfile.txt'
         21        DO_ICALL                                         $12     
         22        SEND_VAR                                                 $12
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.49 ms | 1395 KiB | 17 Q