3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.14 ms | 1396 KiB | 17 Q