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[] = $userid.hash('sha512', random_bytes(64)); var_dump($ids);die; } $a = array_count_values($ids); asort($a); var_dump( $a[key($a)] );
based on 4S1e0
Output for 5.4.10 - 5.6.28, 7.0.1 - 7.2.0
Output for 7.0.0
array(1) { [0]=> string(140) "86376a8b10735274fa57eff0ca926368a291fc8260d56ba35a08b10a36f7b38a4e6f95748045f6dafe267ef048499cda2d7b07265c035cbfa9884afcb24e04f1036afce641a3" }
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/g75lY on line 5
Process exited with code 255.