3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = new \SplTempFileObject(); for ($i = 0; $i < 100; $i++) { $file->fwrite("Foo $i\n"); } $file->rewind(); var_dump($file->key()); var_dump($file->fgets()); var_dump($file->key()); var_dump($file->fgets()); $file->seek(50); var_dump($file->key()); var_dump($file->fgets()); var_dump($file->key()); var_dump($file->fgets()); var_dump($file->key());
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 = 62) Position 1 = -2
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/33lsI
function name:  (null)
number of ops:  65
compiled vars:  !0 = $file, !1 = $i
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        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->12
    6     5    >   INIT_METHOD_CALL                                         !0, 'fwrite'
          6        ROPE_INIT                                     3  ~7      'Foo+'
          7        ROPE_ADD                                      1  ~7      ~7, !1
          8        ROPE_END                                      2  ~6      ~7, '%0A'
          9        SEND_VAL_EX                                              ~6
         10        DO_FCALL                                      0          
    5    11        PRE_INC                                                  !1
         12    >   IS_SMALLER                                               !1, 100
         13      > JMPNZ                                                    ~11, ->5
    9    14    >   INIT_METHOD_CALL                                         !0, 'rewind'
         15        DO_FCALL                                      0          
   11    16        INIT_FCALL                                               'var_dump'
         17        INIT_METHOD_CALL                                         !0, 'key'
         18        DO_FCALL                                      0  $13     
         19        SEND_VAR                                                 $13
         20        DO_ICALL                                                 
   12    21        INIT_FCALL                                               'var_dump'
         22        INIT_METHOD_CALL                                         !0, 'fgets'
         23        DO_FCALL                                      0  $15     
         24        SEND_VAR                                                 $15
         25        DO_ICALL                                                 
   13    26        INIT_FCALL                                               'var_dump'
         27        INIT_METHOD_CALL                                         !0, 'key'
         28        DO_FCALL                                      0  $17     
         29        SEND_VAR                                                 $17
         30        DO_ICALL                                                 
   14    31        INIT_FCALL                                               'var_dump'
         32        INIT_METHOD_CALL                                         !0, 'fgets'
         33        DO_FCALL                                      0  $19     
         34        SEND_VAR                                                 $19
         35        DO_ICALL                                                 
   16    36        INIT_METHOD_CALL                                         !0, 'seek'
         37        SEND_VAL_EX                                              50
         38        DO_FCALL                                      0          
   18    39        INIT_FCALL                                               'var_dump'
         40        INIT_METHOD_CALL                                         !0, 'key'
         41        DO_FCALL                                      0  $22     
         42        SEND_VAR                                                 $22
         43        DO_ICALL                                                 
   19    44        INIT_FCALL                                               'var_dump'
         45        INIT_METHOD_CALL                                         !0, 'fgets'
         46        DO_FCALL                                      0  $24     
         47        SEND_VAR                                                 $24
         48        DO_ICALL                                                 
   20    49        INIT_FCALL                                               'var_dump'
         50        INIT_METHOD_CALL                                         !0, 'key'
         51        DO_FCALL                                      0  $26     
         52        SEND_VAR                                                 $26
         53        DO_ICALL                                                 
   21    54        INIT_FCALL                                               'var_dump'
         55        INIT_METHOD_CALL                                         !0, 'fgets'
         56        DO_FCALL                                      0  $28     
         57        SEND_VAR                                                 $28
         58        DO_ICALL                                                 
   22    59        INIT_FCALL                                               'var_dump'
         60        INIT_METHOD_CALL                                         !0, 'key'
         61        DO_FCALL                                      0  $30     
         62        SEND_VAR                                                 $30
         63        DO_ICALL                                                 
         64      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.14 ms | 1002 KiB | 14 Q