3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmp = tempnam(); $fp = fopen($tmp, '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/ufHBO
function name:  (null)
number of ops:  34
compiled vars:  !0 = $tmp, !1 = $fp, !2 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'tempnam'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    4     3        INIT_FCALL                                               'fopen'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 'w%2B'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    5     8        INIT_FCALL                                               'fwrite'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 'foo%2Cbar%2Cbaz%2Cbat'
         11        DO_ICALL                                                 
    6    12        INIT_FCALL                                               'rewind'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
    8    15        INIT_FCALL                                               'fgetcsv'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $9      
         18        ASSIGN                                                   !2, $9
    9    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
   11    22        INIT_FCALL                                               'rewind'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
   13    25        INIT_FCALL                                               'fgetcsv'
         26        SEND_VAR                                                 !1
         27        SEND_VAL                                                 10
         28        DO_ICALL                                         $13     
         29        ASSIGN                                                   !2, $13
   14    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !2
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.76 ms | 1396 KiB | 25 Q