3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $length = 36; $token = bin2hex(random_bytes($length)); echo $token;
based on ltQPJ
Output for 7.2.0
d4ecae6835c52c7e3aa397914a228a8cd428c7252b517c544c6a59e7547a869325266843
Output for 7.1.10
2d00731225d780dc8e568ed2e4fd3a3e36814e79c5f6591a9ae61082b084959da2bd8353
Output for 7.1.7
0691f0fa2b6db0f17cd830496db9c1372076edc4a0e2c9caadc798ecee9a9aedaa16d3af
Output for 7.1.6
2dff1bbf634286270b0a7677cc586a0bc491d57780f4fe2ed76cf23e8d8c135018fc3617
Output for 7.1.5
7ddf8ac9bb8465a70d0c215cf0f4d8ba9d498c956335639c01ec6b1bf2051b958e1147d6
Output for 7.1.0
4fcc2a97521c9fbf150db40490073b502562b3f598507d239e4b7b496c68e87a364fcaf8
Output for 7.0.20
8b5778eceb6c4f83ac58d156f82ddaa7d3cc87e11e62a006f4f5e5331d8b1bf840e822ca
Output for 7.0.6
3a8411cb5a73db9014cf31ad7561722f2ed5d6b731bbccf4e03edd19196bf4614cc5d795
Output for 7.0.5
13038318f14b77dbb4d1c1631e192b9587c6a8878eec259f432cb209c350b3aaf0024edc
Output for 7.0.4
2c11a237bceacaacfe4cbb09d3e58e874b4b2fa11c757ced9cdd7dc1edd487f241660fb5
Output for 7.0.3
ed1a745fdcb585c689223b129a09638c80c1524a60e5b0093ff3dba65757393b000db84a
Output for 7.0.2
819cce25ca47de2c2341c988c73e339efbac24bdbbc10d328056296d6f4ec92d7b222af2
Output for 7.0.1
e1efbfe4ab1f8bb041bf98fcd7d282478dea5209ef48fce83362ec6a8b29e90d582ba4e1
Output for 7.0.0
5e0161e51a324c95d16f3a818304ec848e3d3d1a04c80562434e7ea72b28990aec05a120
Output for 5.3.22 - 5.6.28
Fatal error: Call to undefined function random_bytes() in /in/AsBkM on line 4
Process exited with code 255.