3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( "NJ", "NY", "PA" ); $length = count($array); echo "<select>"; for ($num = 0; $num <= $length; $num++) { echo "<option value='$num'> $array[$num] </option>"; } echo "</select>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
Branch analysis from position: 6
filename:       /in/ni4KX
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array, !1 = $length, !2 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        COUNT                                            ~4      !0
          2        ASSIGN                                                   !1, ~4
   11     3        ECHO                                                     '%3Cselect%3E'
   13     4        ASSIGN                                                   !2, 0
          5      > JMP                                                      ->14
   15     6    >   ROPE_INIT                                     5  ~9      '%3Coption+value%3D%27'
          7        ROPE_ADD                                      1  ~9      ~9, !2
          8        ROPE_ADD                                      2  ~9      ~9, '%27%3E+'
          9        FETCH_DIM_R                                      ~7      !0, !2
         10        ROPE_ADD                                      3  ~9      ~9, ~7
         11        ROPE_END                                      4  ~8      ~9, '+%3C%2Foption%3E'
         12        ECHO                                                     ~8
   13    13        PRE_INC                                                  !2
         14    >   IS_SMALLER_OR_EQUAL                                      !2, !1
         15      > JMPNZ                                                    ~13, ->6
   18    16    >   ECHO                                                     '%3C%2Fselect%3E'
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.76 ms | 1393 KiB | 13 Q