3v4l.org

run code in 300+ PHP versions simultaneously
<?php $csv = tmpfile(); fputcsv($csv, ['foo', 'bar', 'baz'], '💩'); rewind($csv); echo stream_get_contents($csv); fclose($csv);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ons2t
function name:  (null)
number of ops:  19
compiled vars:  !0 = $csv
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'tmpfile'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
    4     3        INIT_FCALL                                               'fputcsv'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 <array>
          6        SEND_VAL                                                 '%F0%9F%92%A9'
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'rewind'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
    6    11        INIT_FCALL                                               'stream_get_contents'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        ECHO                                                     $5
    7    15        INIT_FCALL                                               'fclose'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.67 ms | 1394 KiB | 23 Q