3v4l.org

run code in 500+ 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 = 13
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/KBvr7
function name:  (null)
number of ops:  15
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, ->13
          5    > > FE_FETCH_R                                                   $6, !1, ->13
    7     6    >   CAST                                              6  ~7      !0
          7        ASSIGN                                                       !2, ~7
    8     8        FRAMELESS_ICALL_2                trim                ~9      !2, '%0A'
          9        ASSIGN                                                       !2, ~9
    9    10        CONCAT                                               ~11     !2, '%0A'
         11        ECHO                                                         ~11
    6    12      > JMP                                                          ->5
         13    >   FE_FREE                                                      $6
   10    14      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
183.51 ms | 3394 KiB | 13 Q