3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (phpversion() != '7.0.0') { die; } $ids = []; for($i=0; $i<100000; $i++) { $userid = bin2hex(random_bytes(64)); $time = time(); $randomString1 = bin2hex(random_bytes(54)); var_dump($time, $randomString1);die; $ids[] = hash('sha512', $time.$randomString1); } $a = array_count_values($ids); asort($a); var_dump( $a[key($a)] );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 8
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/oeENK
function name:  (null)
number of ops:  55
compiled vars:  !0 = $ids, !1 = $i, !2 = $userid, !3 = $time, !4 = $randomString1, !5 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'phpversion'
          1        DO_ICALL                                         $6      
          2        IS_NOT_EQUAL                                             $6, '7.0.0'
          3      > JMPZ                                                     ~7, ->5
          4    > > EXIT                                                     
    5     5    >   ASSIGN                                                   !0, <array>
    7     6        ASSIGN                                                   !1, 0
          7      > JMP                                                      ->38
    9     8    >   INIT_FCALL                                               'bin2hex'
          9        INIT_FCALL                                               'random_bytes'
         10        SEND_VAL                                                 64
         11        DO_ICALL                                         $10     
         12        SEND_VAR                                                 $10
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !2, $11
   10    15        INIT_FCALL                                               'time'
         16        DO_ICALL                                         $13     
         17        ASSIGN                                                   !3, $13
   11    18        INIT_FCALL                                               'bin2hex'
         19        INIT_FCALL                                               'random_bytes'
         20        SEND_VAL                                                 54
         21        DO_ICALL                                         $15     
         22        SEND_VAR                                                 $15
         23        DO_ICALL                                         $16     
         24        ASSIGN                                                   !4, $16
   13    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !3
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                                 
         29      > EXIT                                                     
   15    30*       INIT_FCALL                                               'hash'
         31*       SEND_VAL                                                 'sha512'
         32*       CONCAT                                           ~20     !3, !4
         33*       SEND_VAL                                                 ~20
         34*       DO_ICALL                                         $21     
         35*       ASSIGN_DIM                                               !0
         36*       OP_DATA                                                  $21
    7    37*       PRE_INC                                                  !1
         38    >   IS_SMALLER                                               !1, 100000
         39      > JMPNZ                                                    ~23, ->8
   18    40    >   INIT_FCALL                                               'array_count_values'
         41        SEND_VAR                                                 !0
         42        DO_ICALL                                         $24     
         43        ASSIGN                                                   !5, $24
   19    44        INIT_FCALL                                               'asort'
         45        SEND_REF                                                 !5
         46        DO_ICALL                                                 
   21    47        INIT_FCALL                                               'var_dump'
   22    48        INIT_FCALL                                               'key'
         49        SEND_VAR                                                 !5
         50        DO_ICALL                                         $27     
         51        FETCH_DIM_R                                      ~28     !5, $27
         52        SEND_VAL                                                 ~28
         53        DO_ICALL                                                 
   23    54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.22 ms | 1400 KiB | 31 Q