3v4l.org

run code in 300+ PHP versions simultaneously
<?php // now let's take a look at echoing out cast in a loop $Object = new SplFileObject(__FILE__); foreach($Object as $line) { $objString = (string) $Object; $objString = trim($objString, PHP_EOL); // wanna remove line breaks when outputting file in versions that follow docs echo $objString . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/KBvr7
function name:  (null)
number of ops:  18
compiled vars:  !0 = $Object, !1 = $line, !2 = $objString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $3      'SplFileObject'
          1        SEND_VAL_EX                                              '%2Fin%2FKBvr7'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    6     4      > FE_RESET_R                                       $6      !0, ->16
          5    > > FE_FETCH_R                                               $6, !1, ->16
    7     6    >   CAST                                          6  ~7      !0
          7        ASSIGN                                                   !2, ~7
    8     8        INIT_FCALL                                               'trim'
          9        SEND_VAR                                                 !2
         10        SEND_VAL                                                 '%0A'
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
    9    13        CONCAT                                           ~11     !2, '%0A'
         14        ECHO                                                     ~11
    6    15      > JMP                                                      ->5
         16    >   FE_FREE                                                  $6
   10    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.27 ms | 1395 KiB | 15 Q