3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'abcdefg'; echo "4th char is '$string[3]'"; foreach ($string as $char) { echo "$char\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/jlgY9
function name:  (null)
number of ops:  14
compiled vars:  !0 = $string, !1 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'abcdefg'
    6     1        ROPE_INIT                                     3  ~5      '4th+char+is+%27'
          2        FETCH_DIM_R                                      ~3      !0, 3
          3        ROPE_ADD                                      1  ~5      ~5, ~3
          4        ROPE_END                                      2  ~4      ~5, '%27'
          5        ECHO                                                     ~4
    8     6      > FE_RESET_R                                       $7      !0, ->12
          7    > > FE_FETCH_R                                               $7, !1, ->12
    9     8    >   NOP                                                      
          9        FAST_CONCAT                                      ~8      !1, '%0A'
         10        ECHO                                                     ~8
    8    11      > JMP                                                      ->7
         12    >   FE_FREE                                                  $7
   10    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.72 ms | 1393 KiB | 13 Q