3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.7 ms | 1400 KiB | 25 Q