3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = array(0,0,0,0,0,0,0,0,0,0,0); for ($i=0;$i<1000000;$i++) { $n = rand(0,100000); if ($n<=10) { $r[$n]++; } } print_r($r); $r = array(0,0,0,0,0,0,0,0,0,0,0); for ($i=0;$i<1000000;$i++) { $n = mt_rand(0,100000); if ($n<=10) { $r[$n]++; } } print_r($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 21
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 21
Branch analysis from position: 33
Branch analysis from position: 21
Branch analysis from position: 30
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 3
Branch analysis from position: 15
Branch analysis from position: 3
Branch analysis from position: 12
filename:       /in/3u9h4
function name:  (null)
number of ops:  37
compiled vars:  !0 = $r, !1 = $i, !2 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->13
    4     3    >   INIT_FCALL                                               'rand'
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 100000
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
    5     8        IS_SMALLER_OR_EQUAL                                      !2, 10
          9      > JMPZ                                                     ~7, ->12
    6    10    >   FETCH_DIM_RW                                     $8      !0, !2
         11        PRE_INC                                                  $8
    3    12    >   PRE_INC                                                  !1
         13    >   IS_SMALLER                                               !1, 1000000
         14      > JMPNZ                                                    ~11, ->3
    9    15    >   INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
   11    18        ASSIGN                                                   !0, <array>
   12    19        ASSIGN                                                   !1, 0
         20      > JMP                                                      ->31
   13    21    >   INIT_FCALL                                               'mt_rand'
         22        SEND_VAL                                                 0
         23        SEND_VAL                                                 100000
         24        DO_ICALL                                         $15     
         25        ASSIGN                                                   !2, $15
   14    26        IS_SMALLER_OR_EQUAL                                      !2, 10
         27      > JMPZ                                                     ~17, ->30
   15    28    >   FETCH_DIM_RW                                     $18     !0, !2
         29        PRE_INC                                                  $18
   12    30    >   PRE_INC                                                  !1
         31    >   IS_SMALLER                                               !1, 1000000
         32      > JMPNZ                                                    ~21, ->21
   18    33    >   INIT_FCALL                                               'print_r'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.65 ms | 1400 KiB | 19 Q