3v4l.org

run code in 300+ PHP versions simultaneously
<?php $File = new SplFileObject(__FILE__); echo 'First dump: Just cast as string', "\n"; echo htmlspecialchars((string) $File), "\n"; echo 'Ok, now let\'s iterate echoing out $line var created by foreach', "\n"; foreach($File as $line) { echo htmlspecialchars($line) , "\n"; } echo "\n"; echo 'Ok, now let\'s echo out the object as string again', "\n"; echo htmlspecialchars((string) $File), "\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/anavZ
function name:  (null)
number of ops:  33
compiled vars:  !0 = $File, !1 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'SplFileObject'
          1        SEND_VAL_EX                                              '%2Fin%2FanavZ'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    5     4        ECHO                                                     'First+dump%3A+Just+cast+as+string'
          5        ECHO                                                     '%0A'
    6     6        INIT_FCALL                                               'htmlspecialchars'
          7        CAST                                          6  ~5      !0
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                         $6      
         10        ECHO                                                     $6
         11        ECHO                                                     '%0A'
    8    12        ECHO                                                     'Ok%2C+now+let%27s+iterate+echoing+out+%24line+var+created+by+foreach'
         13        ECHO                                                     '%0A'
    9    14      > FE_RESET_R                                       $7      !0, ->22
         15    > > FE_FETCH_R                                               $7, !1, ->22
   10    16    >   INIT_FCALL                                               'htmlspecialchars'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $8      
         19        ECHO                                                     $8
         20        ECHO                                                     '%0A'
    9    21      > JMP                                                      ->15
         22    >   FE_FREE                                                  $7
   12    23        ECHO                                                     '%0A'
   14    24        ECHO                                                     'Ok%2C+now+let%27s+echo+out+the+object+as+string+again'
         25        ECHO                                                     '%0A'
   15    26        INIT_FCALL                                               'htmlspecialchars'
         27        CAST                                          6  ~9      !0
         28        SEND_VAL                                                 ~9
         29        DO_ICALL                                         $10     
         30        ECHO                                                     $10
         31        ECHO                                                     '%0A'
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.99 ms | 1388 KiB | 15 Q