3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $length = 78; $token = bin2hex(random_bytes($length)); echo $token;
based on G7ahv
Output for 7.2.0
4a93ab99f55367197ad4844426f377173fefccd824b058d1069a6bfa94ac1bc522f7ff61d302311e7b5c5f842f80519f3d7ef1fa2e0ba8e9d111bc5e9b73467dbdd45190369fffb5df4edbf40f80
Output for 7.1.10
bb5f280b78c802d9374b949db3942add9d2554955e30db4ae44963736b133afa450281155937842c2188733dbc457c687fb304fee4563584fe5d31dd01cdda6bbbb4a9cc0e387189a2a8a482bd9f
Output for 7.1.7
e41f68cfd581badca089e415670f1a4226b03b565d0b44852f85a77dd1710f0b2f520a19ebc27a5f2e0233d39d3fa64bd7278338ff0a67c383b5c59426902d84a0aa8d8af79a0d5c71356f608edc
Output for 7.1.6
b8fbc574a61b8368ceecf522040b55ca23b690b69375ab20b5592184079f4c5fb04384d0d28469547bf24146123cde8f1f06fb8832bd4598ceb98b4fa2b76704e8ff065132ee9e034b66862f6643
Output for 7.1.5
233f71d7a79acd4ea5add9e978054e7e5de254a34d51b6277e4840a608144ec4cc578dda9d428cfa4137fd46ad35bb63b16306936666b61f4de407bdcb0801b9ad6ed1cda25aa54e11f31bb91cfa
Output for 7.1.0
32d0035159a318f193fc344c8607a989d43c4e21613e8438c66c775e7cfd91c205e33f9c6ab4ae0da8b41b149b7f7dae7dc5deb70f6450139addcb662372800b0779b7c99db7d08466d3de0ab77a
Output for 7.0.20
5c0196edb7145102587e1c9ca724a8d1f65781b97c7e66e9ba459a912440fb6ce9edda1e81c8cedf351f2f7d02b5f0ec56853c547e52b52256c74467e0b804cafbf5c7371f368b36d8aef22c9ed8
Output for 7.0.6
dd3c04add31d77cfd7729d6cc41c2afa890f5972982b1e4418a2965bb809c3419bd8e058535a990f7abda81163189e69bf6475f0b5b257b16e1b8dfcf8b0e2b3b3c34dca0890ad0f3fb3478faea7
Output for 7.0.5
448e9e09149362b7e1da35034a65a093bd7087452f9ba05abde7b6eb89cd05c005fc7a43874f5deb0a0fefcbce4626e5132f1e0f15d03395ef0c9cb2e457acd56570e74105d048389dc6aa7fb65f
Output for 7.0.4
c604baa67043d1af8401a19b063c7775f6cda5e1cc8d8cebf3499b38508095af4b364a50eff4cdc01ff9098a0bbb2e4797988d6a9788778db6467c655fbf655c574bb5be04b50f3067a4b9aef39d
Output for 7.0.3
df1d041781d00768302538a56033784b4f8a84bedc6b8890d2d370508f26840576652842f315abc1ab5d166fd7f83fc4af3c14831e68f60d08eb8229075df07e1b0615f40fcbf37a9858055f273b
Output for 7.0.2
166fabe4864ecfbdc37e65a7f3fbacfe112d6bc9aeb32fb64d0cfdb7fb364344802ef1e9e302753c132a714013eead0d8bb79a0a4f909be45bedcadfbe694bfc3693fb6c4871ae135279a633f918
Output for 7.0.1
aad1bef9f962ea8466a8505d8ce60c1fb46bd995bbbfd52a6f277fe5b6b55689bfe0a198f6be0f408d35e9d852f132146c4c50d2ed93cb32b2e627680eda9170cd5b476f6346e912652981b23b96
Output for 7.0.0
09158f938aa38001a87e97d46cda61d67d8ed0a3d8722d9886f6842d0291737bfccb8c662ccee27eda89f794a8a2fbad22234226ee397c27d3d6338174bd60f0b3246e94f8768ac4452fcfe43cd7
Output for 5.3.22 - 5.6.21
Fatal error: Call to undefined function random_bytes() in /in/ltQPJ on line 4
Process exited with code 255.