3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = <<< TXT foo bar baz TXT; $file = new SplTempFileObject(-1); $file->fwrite($txt); $file->rewind(); $file->seek(100); echo "{$file->key()} => {$file->current()}";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RZL1U
function name:  (null)
number of ops:  22
compiled vars:  !0 = $txt, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'foo%0Abar%0Abaz'
    8     1        NEW                                              $3      'SplTempFileObject'
          2        SEND_VAL_EX                                              -1
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
    9     5        INIT_METHOD_CALL                                         !1, 'fwrite'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
   11     8        INIT_METHOD_CALL                                         !1, 'rewind'
          9        DO_FCALL                                      0          
   12    10        INIT_METHOD_CALL                                         !1, 'seek'
         11        SEND_VAL_EX                                              100
         12        DO_FCALL                                      0          
   13    13        INIT_METHOD_CALL                                         !1, 'key'
         14        DO_FCALL                                      0  $9      
         15        ROPE_INIT                                     3  ~12     $9
         16        ROPE_ADD                                      1  ~12     ~12, '+%3D%3E+'
         17        INIT_METHOD_CALL                                         !1, 'current'
         18        DO_FCALL                                      0  $10     
         19        ROPE_END                                      2  ~11     ~12, $10
         20        ECHO                                                     ~11
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.48 ms | 1393 KiB | 13 Q