3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<EOL "test0","test1 test2 test3 test4 test5 test6","test7", test01,test02,test03,test04 EOL; $my_csv_text = get_csv_from_internet(); // Open a memory "file" for read/write... $f = fopen('php://memory', 'r+'); fwrite($f, $string); rewind($f); while (($data = fgetcsv($f)) !== FALSE) { var_dump($data); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 17
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 17
Branch analysis from position: 26
Branch analysis from position: 17
filename:       /in/Y6f8U
function name:  (null)
number of ops:  27
compiled vars:  !0 = $string, !1 = $my_csv_text, !2 = $f, !3 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%22test0%22%2C%22test1%0Atest2%0Atest3%0Atest4%0Atest5%0Atest6%22%2C%22test7%22%2C%0Atest01%2Ctest02%2Ctest03%2Ctest04'
   13     1        INIT_FCALL_BY_NAME                                       'get_csv_from_internet'
          2        DO_FCALL                                      0  $5      
          3        ASSIGN                                                   !1, $5
   16     4        INIT_FCALL                                               'fopen'
          5        SEND_VAL                                                 'php%3A%2F%2Fmemory'
          6        SEND_VAL                                                 'r%2B'
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !2, $7
   17     9        INIT_FCALL                                               'fwrite'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   18    13        INIT_FCALL                                               'rewind'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
   20    16      > JMP                                                      ->20
   22    17    >   INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
   20    20    >   INIT_FCALL                                               'fgetcsv'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $12     
         23        ASSIGN                                           ~13     !3, $12
         24        TYPE_CHECK                                  1018          ~13
         25      > JMPNZ                                                    ~14, ->17
   23    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.75 ms | 1396 KiB | 23 Q