3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.2 ms | 1394 KiB | 13 Q