3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.36 ms | 2587 KiB | 19 Q