3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numberOfRandoms = 500; $uniques = array(); do { $uniques[mt_rand(10000, 99999)] = true; } while(count(array_keys($uniques)) < $numberOfRandoms); $uniques = array_keys($uniques); var_dump($uniques);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
filename:       /in/Iq3XO
function name:  (null)
number of ops:  22
compiled vars:  !0 = $numberOfRandoms, !1 = $uniques
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 500
    5     1        ASSIGN                                                   !1, <array>
    7     2    >   INIT_FCALL                                               'mt_rand'
          3        SEND_VAL                                                 10000
          4        SEND_VAL                                                 99999
          5        DO_ICALL                                         $4      
          6        ASSIGN_DIM                                               !1, $4
          7        OP_DATA                                                  <true>
    8     8        INIT_FCALL                                               'array_keys'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        COUNT                                            ~7      $6
         12        IS_SMALLER                                               ~7, !0
         13      > JMPNZ                                                    ~8, ->2
   10    14    >   INIT_FCALL                                               'array_keys'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $9      
         17        ASSIGN                                                   !1, $9
   11    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.13 ms | 1395 KiB | 19 Q