3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stream = fopen('data://text/plain', 'w+'); fputcsv($stream, array('test','csv "derp"')); rewind($stream); $csv = stream_get_contents($stream); fclose($stream); echo $csv;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JBYIC
function name:  (null)
number of ops:  21
compiled vars:  !0 = $stream, !1 = $csv
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'data%3A%2F%2Ftext%2Fplain'
          2        SEND_VAL                                                 'w%2B'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_FCALL                                               'fputcsv'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 <array>
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'rewind'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
    6    12        INIT_FCALL                                               'stream_get_contents'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !1, $6
    7    16        INIT_FCALL                                               'fclose'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
    8    19        ECHO                                                     !1
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.26 ms | 1386 KiB | 23 Q