3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('a"b', 'a\\"b'); $file = fopen('php://memory', 'w+'); fputcsv($file, $array[0]); fputcsv($file, $array[1]); rewind($file); var_dump(stream_get_contents($file)); fclose($file);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KnLot
function name:  (null)
number of ops:  29
compiled vars:  !0 = $array, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'fopen'
          2        SEND_VAL                                                 'php%3A%2F%2Fmemory'
          3        SEND_VAL                                                 'w%2B'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    5     6        INIT_FCALL                                               'fputcsv'
          7        SEND_VAR                                                 !1
          8        FETCH_DIM_R                                      ~5      !0, 0
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
    6    11        INIT_FCALL                                               'fputcsv'
         12        SEND_VAR                                                 !1
         13        FETCH_DIM_R                                      ~7      !0, 1
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                                 
    7    16        INIT_FCALL                                               'rewind'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
    8    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'stream_get_contents'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $10     
         23        SEND_VAR                                                 $10
         24        DO_ICALL                                                 
    9    25        INIT_FCALL                                               'fclose'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.18 ms | 1395 KiB | 25 Q