3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(1, 2); $file = new splfileobject('/tmp/stdfile.txt', 'w+'); $file->fputcsv($a); var_dump(file_get_contents('/tmp/stdfile.txt'));
based on kuGq9
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/8jRYN
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $file
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, <array>
   5     1        NEW                                              $3      :-5
         2        SEND_VAL_EX                                              '%2Ftmp%2Fstdfile.txt'
         3        SEND_VAL_EX                                              'w%2B'
         4        DO_FCALL                                      0          
         5        ASSIGN                                                   !1, $3
   6     6        INIT_METHOD_CALL                                         !1, 'fputcsv'
         7        SEND_VAR_EX                                              !0
         8        DO_FCALL                                      0          
   8     9        INIT_FCALL                                               'var_dump'
        10        INIT_FCALL                                               'file_get_contents'
        11        SEND_VAL                                                 '%2Ftmp%2Fstdfile.txt'
        12        DO_ICALL                                         $7      
        13        SEND_VAR                                                 $7
        14        DO_ICALL                                                 
        15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0