3v4l.org

run code in 300+ PHP versions simultaneously
<?php $first = []; for($i = 0; $i < 10; $i++) $first[$i] = 0; 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 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 10
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 10
Branch analysis from position: 18
Branch analysis from position: 10
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/PUORH
function name:  (null)
number of ops:  22
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, 0
          2      > JMP                                                      ->6
    6     3    >   ASSIGN_DIM                                               !0, !1
          4        OP_DATA                                                  0
    5     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 10
          7      > JMPNZ                                                    ~7, ->3
    8     8    >   ASSIGN                                                   !1, 1
          9      > JMP                                                      ->16
   10    10    >   CAST                                          6  ~9      !1
         11        ASSIGN                                                   !2, ~9
   11    12        FETCH_DIM_R                                      ~11     !2, 0
         13        FETCH_DIM_RW                                     $12     !0, ~11
         14        PRE_INC                                                  $12
    8    15        PRE_INC                                                  !1
         16    >   IS_SMALLER_OR_EQUAL                                      !1, 1000
         17      > JMPNZ                                                    ~15, ->10
   13    18    >   INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.39 ms | 1395 KiB | 15 Q