3v4l.org

run code in 300+ PHP versions simultaneously
<?php $md5s = []; for ($id=1; true; $id++) { $md5 = str_replace( ['+', '/', '='], '', base64_encode(md5($id . 'something')) ); if (($collision = array_search($md5, $md5s)) !== false) { exit("collision: {$id}, {$md5s[$collision]}"); } if ($id % 100 === 0) { echo "{$id} iterations; no collisions so far\n"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 3
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 29
Branch analysis from position: 23
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 35
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 3
Branch analysis from position: 37
Branch analysis from position: 3
Branch analysis from position: 35
filename:       /in/miU98
function name:  (null)
number of ops:  38
compiled vars:  !0 = $md5s, !1 = $id, !2 = $md5, !3 = $collision
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->36
    5     3    >   INIT_FCALL                                               'str_replace'
    6     4        SEND_VAL                                                 <array>
    7     5        SEND_VAL                                                 ''
    8     6        INIT_FCALL                                               'base64_encode'
          7        INIT_FCALL                                               'md5'
          8        CONCAT                                           ~6      !1, 'something'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                         $7      
         11        SEND_VAR                                                 $7
         12        DO_ICALL                                         $8      
         13        SEND_VAR                                                 $8
         14        DO_ICALL                                         $9      
    5    15        ASSIGN                                                   !2, $9
   10    16        INIT_FCALL                                               'array_search'
         17        SEND_VAR                                                 !2
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $11     
         20        ASSIGN                                           ~12     !3, $11
         21        TYPE_CHECK                                  1018          ~12
         22      > JMPZ                                                     ~13, ->29
   11    23    >   ROPE_INIT                                     4  ~16     'collision%3A+'
         24        ROPE_ADD                                      1  ~16     ~16, !1
         25        ROPE_ADD                                      2  ~16     ~16, '%2C+'
         26        FETCH_DIM_R                                      ~14     !0, !3
         27        ROPE_END                                      3  ~15     ~16, ~14
         28      > EXIT                                                     ~15
   13    29    >   MOD                                              ~18     !1, 100
         30        IS_IDENTICAL                                             ~18, 0
         31      > JMPZ                                                     ~19, ->35
   14    32    >   NOP                                                      
         33        FAST_CONCAT                                      ~20     !1, '+iterations%3B+no+collisions+so+far%0A'
         34        ECHO                                                     ~20
    4    35    >   PRE_INC                                                  !1
         36    > > JMPNZ                                                    <true>, ->3
   16    37    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.25 ms | 1400 KiB | 21 Q