3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.64 ms | 1400 KiB | 15 Q