3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if (phpversion() != '7.0.0') { die; } $ids = []; for($i=0; $i<100000; $i++) { $userid = bin2hex(random_bytes(6)); $ids[] = hash('sha512', random_bytes(64)); var_dump($ids);die; } $a = array_count_values($ids); asort($a); var_dump( $a[key($a)] );
based on g75lY
Output for 5.4.10 - 5.6.28, 7.0.1 - 7.2.0
Output for 7.0.0
array(1) { [0]=> string(128) "ed2f921d9ca7e09b37fe543c5c7093837bed36dfeeb5c57a87d457bdd3a7858331bc0158fdc9cdb9fb482259d43c9a40828743f0e21cd10e8e73a1447ddf5509" }
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/ofJFD on line 5
Process exited with code 255.