3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ "test1", "test2", "test3", "test4", "test5", ]; $handle = fopen('php://memory', 'w+'); // Accepting the default values doesnt work fputcsv($handle, $data); // Providing all default parameter values work fputcsv($handle, $data, ",", "\"", "\\", "\n"); fclose($handle);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aRvTD
function name:  (null)
number of ops:  22
compiled vars:  !0 = $data, !1 = $handle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'fopen'
          2        SEND_VAL                                                 'php%3A%2F%2Fmemory'
          3        SEND_VAL                                                 'w%2B'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   14     6        INIT_FCALL                                               'fputcsv'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   17    10        INIT_FCALL                                               'fputcsv'
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 '%2C'
         14        SEND_VAL                                                 '%22'
         15        SEND_VAL                                                 '%5C'
         16        SEND_VAL                                                 '%0A'
         17        DO_ICALL                                                 
   19    18        INIT_FCALL                                               'fclose'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.59 ms | 1003 KiB | 16 Q