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)] );
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.1 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
Output for 7.0.0
int(1449588602) string(108) "fa8699f02c468bd65ec57c962bff9fb0879140069d5c67303086faad460f88e6938bb9dccdc8c217f9483c16432f854504d86225a6b3"

preferences:
149.35 ms | 401 KiB | 196 Q