3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = pack('N', time()); $b = pack('N', substr(time(), 2, 8)); $c = random_bytes(2); $d = random_bytes(2); echo bin2hex($a . $b . $c . $d).PHP_EOL; echo time();
Output for 7.2.0
564350b702d102b7592c6fdf 1447252151
Output for 7.1.10
564350b702d102b79852dcbe 1447252151
Output for 7.1.7
564350b702d102b7c97a8384 1447252151
Output for 7.1.6
564350b702d102b7521d60d7 1447252151
Output for 7.1.5
564350b702d102b7a2a30559 1447252151
Output for 7.1.0
564350b702d102b7ac5a28c3 1447252151
Output for 7.0.20
564350b702d102b7a81c9bd6 1447252151
Output for 7.0.8
56434ebf02d100bf75bef3ee 1447251647
Output for 7.0.7
56434ebf02d100bf1dfa1989 1447251647
Output for 7.0.6
56434ebf02d100bfaa3cb10a 1447251647
Output for 7.0.5
56434ebf02d100bff6a1a436 1447251647
Output for 7.0.4
56434ebf02d100bfb1021b9f 1447251647
Output for 7.0.3
56434ebf02d100bfb72f8ca3 1447251647
Output for 7.0.2
56434ebf02d100bfce3b2669 1447251647
Output for 7.0.1
56434ebf02d100bfb7aed5a7 1447251647
Output for 7.0.0
56434ebf02d100bff4115397 1447251647
Output for 5.5.0 - 5.6.28
Fatal error: Call to undefined function random_bytes() in /in/WAhbl on line 5
Process exited with code 255.