3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = range(0, 49); $prob = array_fill(0, 50, 0); for ($i = 0; $i < 10000; $i++) { $rand = array_rand($values, 10); foreach($rand as $key => $value) { $prob[$values[$value]]++; } } asort($prob); var_dump($prob);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 13
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 13
Branch analysis from position: 29
Branch analysis from position: 13
Branch analysis from position: 25
filename:       /in/hGHde
function name:  (null)
number of ops:  36
compiled vars:  !0 = $values, !1 = $prob, !2 = $i, !3 = $rand, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 49
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !0, $6
    4     5        INIT_FCALL                                               'array_fill'
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 50
          8        SEND_VAL                                                 0
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !1, $8
    5    11        ASSIGN                                                   !2, 0
         12      > JMP                                                      ->27
    6    13    >   INIT_FCALL                                               'array_rand'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 10
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !3, $11
    7    18      > FE_RESET_R                                       $13     !3, ->25
         19    > > FE_FETCH_R                                       ~14     $13, !4, ->25
         20    >   ASSIGN                                                   !5, ~14
    8    21        FETCH_DIM_R                                      ~16     !0, !4
         22        FETCH_DIM_RW                                     $17     !1, ~16
         23        PRE_INC                                                  $17
    7    24      > JMP                                                      ->19
         25    >   FE_FREE                                                  $13
    5    26        PRE_INC                                                  !2
         27    >   IS_SMALLER                                               !2, 10000
         28      > JMPNZ                                                    ~20, ->13
   11    29    >   INIT_FCALL                                               'asort'
         30        SEND_REF                                                 !1
         31        DO_ICALL                                                 
   12    32        INIT_FCALL                                               'var_dump'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.62 ms | 1401 KiB | 23 Q