3v4l.org

run code in 300+ PHP versions simultaneously
<?php $File = new SplFileObject(__FILE__); echo 'SplFileObject::__toString(): ', (string) htmlspecialchars($File), PHP_EOL; echo PHP_EOL; echo "Now let's loop through the file"; foreach ($File as $line) { echo htmlspecialchars($line), PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 21
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 21
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/QkpH6
function name:  (null)
number of ops:  23
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%2FQkpH6'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    5     4        ECHO                                                     'SplFileObject%3A%3A__toString%28%29%3A+'
          5        INIT_FCALL                                               'htmlspecialchars'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8        CAST                                          6  ~6      $5
          9        ECHO                                                     ~6
         10        ECHO                                                     '%0A'
    6    11        ECHO                                                     '%0A'
    7    12        ECHO                                                     'Now+let%27s+loop+through+the+file'
    8    13      > FE_RESET_R                                       $7      !0, ->21
         14    > > FE_FETCH_R                                               $7, !1, ->21
   10    15    >   INIT_FCALL                                               'htmlspecialchars'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $8      
         18        ECHO                                                     $8
         19        ECHO                                                     '%0A'
    8    20      > JMP                                                      ->14
         21    >   FE_FREE                                                  $7
   11    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.85 ms | 1395 KiB | 15 Q