3v4l.org

run code in 300+ PHP versions simultaneously
<?php $valeurs = range(1, 40); $proba = array_fill(1, 40, 0); for ($i = 0; $i < 10000; ++$i) { $tirage_tab = array_rand($valeurs, 10); foreach($tirage_tab as $key => $value) { $proba[$valeurs[$value]]++; } } asort($proba); echo "Proba : <br/>\n"; foreach($proba as $key => $value) { echo "$key : $value/10000\n"; }
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
2 jumps found. (Code = 77) Position 1 = 34, Position 2 = 42
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 42
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
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/o03hk
function name:  (null)
number of ops:  44
compiled vars:  !0 = $valeurs, !1 = $proba, !2 = $i, !3 = $tirage_tab, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 40
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !0, $6
    3     5        INIT_FCALL                                               'array_fill'
          6        SEND_VAL                                                 1
          7        SEND_VAL                                                 40
          8        SEND_VAL                                                 0
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !1, $8
    4    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
    9    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
    4    26        PRE_INC                                                  !2
         27    >   IS_SMALLER                                               !2, 10000
         28      > JMPNZ                                                    ~20, ->13
   13    29    >   INIT_FCALL                                               'asort'
         30        SEND_REF                                                 !1
         31        DO_ICALL                                                 
   14    32        ECHO                                                     'Proba+%3A+%3Cbr%2F%3E%0A'
   15    33      > FE_RESET_R                                       $22     !1, ->42
         34    > > FE_FETCH_R                                       ~23     $22, !4, ->42
         35    >   ASSIGN                                                   !5, ~23
   17    36        ROPE_INIT                                     4  ~26     !5
         37        ROPE_ADD                                      1  ~26     ~26, '+%3A+'
         38        ROPE_ADD                                      2  ~26     ~26, !4
         39        ROPE_END                                      3  ~25     ~26, '%2F10000%0A'
         40        ECHO                                                     ~25
   15    41      > JMP                                                      ->34
         42    >   FE_FREE                                                  $22
   18    43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.99 ms | 1400 KiB | 21 Q