3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('memory_limit', '1G'); $hashes = array_map(function ($num) { return substr(md5($num), 0, 8); }, range(0, 10000000)); print_r(array_slice($hashes, 0, 10)); if (array_unique($hashes) == $hashes) { echo 'all unique'; } else { echo 'collisions detected'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TGmNB
function name:  (null)
number of ops:  31
compiled vars:  !0 = $hashes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'memory_limit'
          2        SEND_VAL                                                 '1G'
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'array_map'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FTGmNB%3A5%240'
          6        SEND_VAL                                                 ~2
          7        INIT_FCALL                                               'range'
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 10000000
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                         $4      
         13        ASSIGN                                                   !0, $4
    7    14        INIT_FCALL                                               'print_r'
         15        INIT_FCALL                                               'array_slice'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 0
         18        SEND_VAL                                                 10
         19        DO_ICALL                                         $6      
         20        SEND_VAR                                                 $6
         21        DO_ICALL                                                 
    9    22        INIT_FCALL                                               'array_unique'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $8      
         25        IS_EQUAL                                                 !0, $8
         26      > JMPZ                                                     ~9, ->29
   10    27    >   ECHO                                                     'all+unique'
         28      > JMP                                                      ->30
   12    29    >   ECHO                                                     'collisions+detected'
   13    30    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FTGmNB%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TGmNB
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'substr'
          2        INIT_FCALL                                               'md5'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 8
          8        DO_ICALL                                         $2      
          9      > RETURN                                                   $2
         10*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FTGmNB%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.52 ms | 1405 KiB | 29 Q