3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new SplFileObject("data:text/plain,line1\r\nline2\r\nline3", 'r'); for($k = $x->key(), $v = $x->current(); $x->valid(); $x->next()) echo "$k: $v";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 12
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 12
Branch analysis from position: 21
Branch analysis from position: 12
filename:       /in/37oaZ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $x, !1 = $k, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'SplFileObject'
          1        SEND_VAL_EX                                              'data%3Atext%2Fplain%2Cline1%0D%0Aline2%0D%0Aline3'
          2        SEND_VAL_EX                                              'r'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
    5     5        INIT_METHOD_CALL                                         !0, 'key'
          6        DO_FCALL                                      0  $6      
          7        ASSIGN                                                   !1, $6
          8        INIT_METHOD_CALL                                         !0, 'current'
          9        DO_FCALL                                      0  $8      
         10        ASSIGN                                                   !2, $8
         11      > JMP                                                      ->18
    6    12    >   ROPE_INIT                                     3  ~11     !1
         13        ROPE_ADD                                      1  ~11     ~11, '%3A+'
         14        ROPE_END                                      2  ~10     ~11, !2
         15        ECHO                                                     ~10
    5    16        INIT_METHOD_CALL                                         !0, 'next'
         17        DO_FCALL                                      0          
         18    >   INIT_METHOD_CALL                                         !0, 'valid'
         19        DO_FCALL                                      0  $14     
         20      > JMPNZ                                                    $14, ->12
    6    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.23 ms | 1394 KiB | 13 Q