3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump((new ReflectionFunction('fputcsv'))->getNumberOfParameters()); $fp = fopen('php://temp', 'r+'); $res = fputcsv($fp, [1, 2, 3], ',', '"', '\\'); var_dump($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WARpp
function name:  (null)
number of ops:  25
compiled vars:  !0 = $fp, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        NEW                                              $2      'ReflectionFunction'
          2        SEND_VAL_EX                                              'fputcsv'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $2, 'getNumberOfParameters'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
    4     8        INIT_FCALL                                               'fopen'
          9        SEND_VAL                                                 'php%3A%2F%2Ftemp'
         10        SEND_VAL                                                 'r%2B'
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !0, $6
    5    13        INIT_FCALL                                               'fputcsv'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 <array>
         16        SEND_VAL                                                 '%2C'
         17        SEND_VAL                                                 '%22'
         18        SEND_VAL                                                 '%5C'
         19        DO_ICALL                                         $8      
         20        ASSIGN                                                   !1, $8
    6    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.54 ms | 1395 KiB | 19 Q