3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fileContents = <<<EOD "quote \"testing\"","" "quote ""testing""","" "quote \,testing\,","" EOD; $handle = fopen('php://memory', 'w'); fwrite($handle, $fileContents); fseek($handle, 0); while(!feof($handle)) { $test = fgetcsv($handle, 0, ',', '"'); print_r($test); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 15
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 15
Branch analysis from position: 30
Branch analysis from position: 15
filename:       /in/0CIAh
function name:  (null)
number of ops:  31
compiled vars:  !0 = $fileContents, !1 = $handle, !2 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%22quote+%5C%22testing%5C%22%22%2C%22%22%0A%22quote+%22%22testing%22%22%22%2C%22%22%0A%22quote+%5C%2Ctesting%5C%2C%22%2C%22%22'
    9     1        INIT_FCALL                                               'fopen'
          2        SEND_VAL                                                 'php%3A%2F%2Fmemory'
          3        SEND_VAL                                                 'w'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   10     6        INIT_FCALL                                               'fwrite'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   11    10        INIT_FCALL                                               'fseek'
         11        SEND_VAR                                                 !1
         12        SEND_VAL                                                 0
         13        DO_ICALL                                                 
   13    14      > JMP                                                      ->25
   15    15    >   INIT_FCALL                                               'fgetcsv'
         16        SEND_VAR                                                 !1
         17        SEND_VAL                                                 0
         18        SEND_VAL                                                 '%2C'
         19        SEND_VAL                                                 '%22'
         20        DO_ICALL                                         $8      
         21        ASSIGN                                                   !2, $8
   16    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                                 
   13    25    >   INIT_FCALL                                               'feof'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $11     
         28        BOOL_NOT                                         ~12     $11
         29      > JMPNZ                                                    ~12, ->15
   17    30    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.7 ms | 1396 KiB | 25 Q