3v4l.org

run code in 500+ PHP versions simultaneously
<?php $size = pow(2, $length = 14); $initial_colliding = [ 'Ex', 'FW', ]; $initial_size = count($initial_colliding); $start = microtime(true); for($i=0; $i<($size);$i++) { $s = str_pad(base_convert($i, 10, $initial_size), $length, '0', STR_PAD_LEFT); $strings1[strtr($s, $initial_colliding)] = 0; } $end = microtime(true); echo "Inserting $size evil elements took " . number_format($end - $start, 10) . " seconds \n"; $start = microtime(true); $key = 'aaaaaaaaaaaaaaaaaaaaaaaaa'; for($i=0; $i<($size);$i++) { $s = str_pad(base_convert($i, 10, $initial_size), $length, '0', STR_PAD_LEFT); $evil_key_generated = strtr($s, $initial_colliding); $strings2[$key] = 0; $key++; } $end = microtime(true); echo "Inserting $size good elements took " . number_format($end - $start, 10) . " seconds \n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 15
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
2 jumps found. (Code = 44) Position 1 = 75, Position 2 = 55
Branch analysis from position: 75
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
2 jumps found. (Code = 44) Position 1 = 75, Position 2 = 55
Branch analysis from position: 75
Branch analysis from position: 55
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 15
Branch analysis from position: 33
Branch analysis from position: 15
filename:       /in/H6h62
function name:  (null)
number of ops:  91
compiled vars:  !0 = $size, !1 = $length, !2 = $initial_colliding, !3 = $initial_size, !4 = $start, !5 = $i, !6 = $s, !7 = $strings1, !8 = $end, !9 = $key, !10 = $evil_key_generated, !11 = $strings2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'pow'
          1        SEND_VAL                                                     2
          2        ASSIGN                                               ~12     !1, 14
          3        SEND_VAL                                                     ~12
          4        DO_ICALL                                             $13     
          5        ASSIGN                                                       !0, $13
    4     6        ASSIGN                                                       !2, <array>
    8     7        COUNT                                                ~16     !2
          8        ASSIGN                                                       !3, ~16
    9     9        INIT_FCALL                                                   'microtime'
         10        SEND_VAL                                                     <true>
         11        DO_ICALL                                             $18     
         12        ASSIGN                                                       !4, $18
   11    13        ASSIGN                                                       !5, 0
         14      > JMP                                                          ->31
   12    15    >   INIT_FCALL                                                   'str_pad'
         16        INIT_FCALL                                                   'base_convert'
         17        SEND_VAR                                                     !5
         18        SEND_VAL                                                     10
         19        SEND_VAR                                                     !3
         20        DO_ICALL                                             $21     
         21        SEND_VAR                                                     $21
         22        SEND_VAR                                                     !1
         23        SEND_VAL                                                     '0'
         24        SEND_VAL                                                     0
         25        DO_ICALL                                             $22     
         26        ASSIGN                                                       !6, $22
   13    27        FRAMELESS_ICALL_2                strtr               ~24     !6, !2
         28        ASSIGN_DIM                                                   !7, ~24
         29        OP_DATA                                                      0
   11    30        PRE_INC                                                      !5
         31    >   IS_SMALLER                                                   !5, !0
         32      > JMPNZ                                                        ~27, ->15
   15    33    >   INIT_FCALL                                                   'microtime'
         34        SEND_VAL                                                     <true>
         35        DO_ICALL                                             $28     
         36        ASSIGN                                                       !8, $28
   16    37        ROPE_INIT                                         3  ~31     'Inserting+'
         38        ROPE_ADD                                          1  ~31     ~31, !0
         39        ROPE_END                                          2  ~30     ~31, '+evil+elements+took+'
         40        INIT_FCALL                                                   'number_format'
         41        SUB                                                  ~33     !8, !4
         42        SEND_VAL                                                     ~33
         43        SEND_VAL                                                     10
         44        DO_ICALL                                             $34     
         45        CONCAT                                               ~35     ~30, $34
         46        CONCAT                                               ~36     ~35, '+seconds+%0A'
         47        ECHO                                                         ~36
   18    48        INIT_FCALL                                                   'microtime'
         49        SEND_VAL                                                     <true>
         50        DO_ICALL                                             $37     
         51        ASSIGN                                                       !4, $37
   19    52        ASSIGN                                                       !9, 'aaaaaaaaaaaaaaaaaaaaaaaaa'
   20    53        ASSIGN                                                       !5, 0
         54      > JMP                                                          ->73
   21    55    >   INIT_FCALL                                                   'str_pad'
         56        INIT_FCALL                                                   'base_convert'
         57        SEND_VAR                                                     !5
         58        SEND_VAL                                                     10
         59        SEND_VAR                                                     !3
         60        DO_ICALL                                             $41     
         61        SEND_VAR                                                     $41
         62        SEND_VAR                                                     !1
         63        SEND_VAL                                                     '0'
         64        SEND_VAL                                                     0
         65        DO_ICALL                                             $42     
         66        ASSIGN                                                       !6, $42
   22    67        FRAMELESS_ICALL_2                strtr               ~44     !6, !2
         68        ASSIGN                                                       !10, ~44
   23    69        ASSIGN_DIM                                                   !11, !9
         70        OP_DATA                                                      0
   24    71        PRE_INC                                                      !9
   20    72        PRE_INC                                                      !5
         73    >   IS_SMALLER                                                   !5, !0
         74      > JMPNZ                                                        ~49, ->55
   26    75    >   INIT_FCALL                                                   'microtime'
         76        SEND_VAL                                                     <true>
         77        DO_ICALL                                             $50     
         78        ASSIGN                                                       !8, $50
   27    79        ROPE_INIT                                         3  ~53     'Inserting+'
         80        ROPE_ADD                                          1  ~53     ~53, !0
         81        ROPE_END                                          2  ~52     ~53, '+good+elements+took+'
         82        INIT_FCALL                                                   'number_format'
         83        SUB                                                  ~55     !8, !4
         84        SEND_VAL                                                     ~55
         85        SEND_VAL                                                     10
         86        DO_ICALL                                             $56     
         87        CONCAT                                               ~57     ~52, $56
         88        CONCAT                                               ~58     ~57, '+seconds+%0A'
         89        ECHO                                                         ~58
         90      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.19 ms | 1304 KiB | 19 Q