3v4l.org

run code in 300+ PHP versions simultaneously
<?php $first = []; for ($i = 1; $i <= 1000; $i++) { $str = (string)$i; $first[$str[0]]++; } var_dump($first);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
Branch analysis from position: 3
filename:       /in/r6S0V
function name:  (null)
number of ops:  15
compiled vars:  !0 = $first, !1 = $i, !2 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->9
    7     3    >   CAST                                          6  ~5      !1
          4        ASSIGN                                                   !2, ~5
    8     5        FETCH_DIM_R                                      ~7      !2, 0
          6        FETCH_DIM_RW                                     $8      !0, ~7
          7        PRE_INC                                                  $8
    5     8        PRE_INC                                                  !1
          9    >   IS_SMALLER_OR_EQUAL                                      !1, 1000
         10      > JMPNZ                                                    ~11, ->3
   10    11    >   INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.51 ms | 1394 KiB | 15 Q