3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.25 ms | 1395 KiB | 23 Q