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(12)); $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 oeENK
Output for 5.4.10 - 5.6.28, 7.0.1 - 7.2.0
Output for 7.0.0
array(1) { [0]=> string(152) "8f0c563a5db5a3782d39eaab31bfabb7b6de4603943c05fc62f40c0cdd596dd93d20a2a5aef82b2c16f5f1f633b92274509346adcc52332485a4164893bf4a6850dc9925ec440b50e822f7cd" }
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/4S1e0 on line 5
Process exited with code 255.