3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); $file = new SplTempFileObject(); // write to file for ($i = 0; $i < 5; $i++) { $file->fwrite("line {$i}" . PHP_EOL); } // read from file $file->rewind(); while ($file->valid()) { echo $file->key(), ': ', $file->fgets(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 5
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 17
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 17
Branch analysis from position: 27
Branch analysis from position: 17
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 5
Branch analysis from position: 14
Branch analysis from position: 5
filename:       /in/RHFfI
function name:  (null)
number of ops:  28
compiled vars:  !0 = $file, !1 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   NEW                                                  $2      'SplTempFileObject'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
    8     3        ASSIGN                                                       !1, 0
          4      > JMP                                                          ->12
    9     5    >   INIT_METHOD_CALL                                             !0, 'fwrite'
          6        NOP                                                          
          7        FAST_CONCAT                                          ~6      'line+', !1
          8        CONCAT                                               ~7      ~6, '%0A'
          9        SEND_VAL_EX                                                  ~7
         10        DO_FCALL                                          0          
    8    11        PRE_INC                                                      !1
         12    >   IS_SMALLER                                                   !1, 5
         13      > JMPNZ                                                        ~10, ->5
   13    14    >   INIT_METHOD_CALL                                             !0, 'rewind'
         15        DO_FCALL                                          0          
   14    16      > JMP                                                          ->24
   15    17    >   INIT_METHOD_CALL                                             !0, 'key'
         18        DO_FCALL                                          0  $12     
         19        ECHO                                                         $12
         20        ECHO                                                         '%3A+'
         21        INIT_METHOD_CALL                                             !0, 'fgets'
         22        DO_FCALL                                          0  $13     
         23        ECHO                                                         $13
   14    24    >   INIT_METHOD_CALL                                             !0, 'valid'
         25        DO_FCALL                                          0  $14     
         26      > JMPNZ                                                        $14, ->17
   16    27    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.75 ms | 1875 KiB | 13 Q