3v4l.org

run code in 300+ PHP versions simultaneously
<?php $uniqueIds = []; while(count($uniqueIds) < 5) { $hash = md5(rand(1000, 9999)); if (!in_array($hash, $uniqueIds)) { $uniqueIds[] = $hash; } } var_dump($uniqueIds);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 2
Branch analysis from position: 21
Branch analysis from position: 2
Branch analysis from position: 18
filename:       /in/DErbR
function name:  (null)
number of ops:  25
compiled vars:  !0 = $uniqueIds, !1 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > JMP                                                      ->18
    5     2    >   INIT_FCALL                                               'md5'
          3        INIT_FCALL                                               'rand'
          4        SEND_VAL                                                 1000
          5        SEND_VAL                                                 9999
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
    6    10        INIT_FCALL                                               'in_array'
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        BOOL_NOT                                         ~7      $6
         15      > JMPZ                                                     ~7, ->18
    7    16    >   ASSIGN_DIM                                               !0
         17        OP_DATA                                                  !1
    4    18    >   COUNT                                            ~9      !0
         19        IS_SMALLER                                               ~9, 5
         20      > JMPNZ                                                    ~10, ->2
   10    21    >   INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145 ms | 1395 KiB | 21 Q