3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = new SplTempFileObject(); $file->fwrite("foo,bar\n"); $file->fwrite("\n"); $file->fwrite("baz,qux"); $file->rewind(); $file->setFlags(SplFileObject::READ_CSV | SplFileObject::READ_AHEAD | SplFileObject::SKIP_EMPTY /* | SplFileObject::DROP_NEW_LINE */); foreach ($file as $line) { var_dump($line); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/PS0El
function name:  (null)
number of ops:  25
compiled vars:  !0 = $file, !1 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'SplTempFileObject'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    5     3        INIT_METHOD_CALL                                         !0, 'fwrite'
          4        SEND_VAL_EX                                              'foo%2Cbar%0A'
          5        DO_FCALL                                      0          
    6     6        INIT_METHOD_CALL                                         !0, 'fwrite'
          7        SEND_VAL_EX                                              '%0A'
          8        DO_FCALL                                      0          
    7     9        INIT_METHOD_CALL                                         !0, 'fwrite'
         10        SEND_VAL_EX                                              'baz%2Cqux'
         11        DO_FCALL                                      0          
    9    12        INIT_METHOD_CALL                                         !0, 'rewind'
         13        DO_FCALL                                      0          
   11    14        INIT_METHOD_CALL                                         !0, 'setFlags'
         15        SEND_VAL_EX                                              14
         16        DO_FCALL                                      0          
   14    17      > FE_RESET_R                                       $10     !0, ->23
         18    > > FE_FETCH_R                                               $10, !1, ->23
   15    19    >   INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
   14    22      > JMP                                                      ->18
         23    >   FE_FREE                                                  $10
   16    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.44 ms | 1005 KiB | 14 Q