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(16)); var_dump($ids);die; } $a = array_count_values($ids); asort($a); var_dump( $a[key($a)] );
based on NWdeP
Output for 5.4.10 - 5.6.28, 7.0.1 - 7.2.0
Output for 7.0.0
array(1) { [0]=> string(128) "b78ea6c5a2d85d9cbd2f36c2c8c5faf108fdd2e7c661e2d8c7ab55f5647858dd85fe8d6102bc77a0a5b7ceda4f11b06b0a57df92537fab59febf1dac2ac8db8e" }
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/iaQcN on line 5
Process exited with code 255.