3v4l.org

run code in 500+ PHP versions simultaneously
<?php $file = new \SplTempFileObject(); for ($i = 0; $i < 100; $i++) { $file->fwrite("Foo\n"); } $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 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 5
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 5
Branch analysis from position: 11
Branch analysis from position: 5
filename:       /in/bX3E0
function name:  (null)
number of ops:  40
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                                                          ->9
    6     5    >   INIT_METHOD_CALL                                             !0, 'fwrite'
          6        SEND_VAL_EX                                                  'Foo%0A'
          7        DO_FCALL                                          0          
    5     8        PRE_INC                                                      !1
          9    >   IS_SMALLER                                                   !1, 100
         10      > JMPNZ                                                        ~8, ->5
    9    11    >   INIT_METHOD_CALL                                             !0, 'seek'
         12        SEND_VAL_EX                                                  50
         13        DO_FCALL                                          0          
   11    14        INIT_FCALL                                                   'var_dump'
         15        INIT_METHOD_CALL                                             !0, 'key'
         16        DO_FCALL                                          0  $10     
         17        SEND_VAR                                                     $10
         18        DO_ICALL                                                     
   12    19        INIT_FCALL                                                   'var_dump'
         20        INIT_METHOD_CALL                                             !0, 'fgets'
         21        DO_FCALL                                          0  $12     
         22        SEND_VAR                                                     $12
         23        DO_ICALL                                                     
   13    24        INIT_FCALL                                                   'var_dump'
         25        INIT_METHOD_CALL                                             !0, 'key'
         26        DO_FCALL                                          0  $14     
         27        SEND_VAR                                                     $14
         28        DO_ICALL                                                     
   14    29        INIT_FCALL                                                   'var_dump'
         30        INIT_METHOD_CALL                                             !0, 'fgets'
         31        DO_FCALL                                          0  $16     
         32        SEND_VAR                                                     $16
         33        DO_ICALL                                                     
   15    34        INIT_FCALL                                                   'var_dump'
         35        INIT_METHOD_CALL                                             !0, 'key'
         36        DO_FCALL                                          0  $18     
         37        SEND_VAR                                                     $18
         38        DO_ICALL                                                     
         39      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
152.59 ms | 1438 KiB | 9 Q