3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: text/plain'); $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 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/Qrsgb
function name:  (null)
number of ops:  17
compiled vars:  !0 = $string, !1 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-Type%3A+text%2Fplain'
          2        DO_ICALL                                                 
    4     3        ASSIGN                                                   !0, 'abcdefg'
    6     4        ROPE_INIT                                     3  ~6      '4th+char+is+%27'
          5        FETCH_DIM_R                                      ~4      !0, 3
          6        ROPE_ADD                                      1  ~6      ~6, ~4
          7        ROPE_END                                      2  ~5      ~6, '%27'
          8        ECHO                                                     ~5
    8     9      > FE_RESET_R                                       $8      !0, ->15
         10    > > FE_FETCH_R                                               $8, !1, ->15
    9    11    >   NOP                                                      
         12        FAST_CONCAT                                      ~9      !1, '%0A'
         13        ECHO                                                     ~9
    8    14      > JMP                                                      ->10
         15    >   FE_FREE                                                  $8
   10    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.58 ms | 1395 KiB | 15 Q