3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.37 ms | 1015 KiB | 18 Q