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.3.1
87909d307bc90e5725e7358b590189ffd55eec16110129d08fd8d12e10552ffc20410f2bfc88aa2b8d0695bbae2f2eba5ab89cb442facf9834ec63933a1ba3c9c8288e14f3c857e991f122914029
Output for 7.3.0
0a44c79e9e4ec5b86ed134dd9b44e284bd4f15ab950409fd75d2dfbde580594bc0e3c9d9ed0037dc93a8b3240bf398ec4b156363463134dc7f453af60b739cfcf99962b4e0c5e603d61395613875
Output for 7.2.13
004aa8990637a9475cbd4627ec522508e91e012fc39c26aa5742f2b0c42c6585aa48d52a04b3f91a24065c77680daff5d2f8c86062bdaf4e52305aeb6d131f0ced313f6b2ae893d1b446dc1cf29a
Output for 7.2.12
606fb42dc0f21c766dbcbcbe7e130a347598dd426268f5291fe1fad338b782da64578411a1d95716ad5b6869d32ba43fa06d2c7197c2c2a0ea1c80640ed0c0bc36d5f435973a301f54f8419a9242
Output for 7.2.11
32e5a6ae3342afe2a31bd6f487e6a81599cc22046a84fdad7d9344a2ae2c5825a009ddbc670645ee5ce37e15a09d2593df5bf1682c855512fb9286d4d326099ef3c59abba1a28d9f665ba578af66
Output for 7.2.10
8d011370b9af652acedebd0092cb123bf7907e36dfcad2577911fcccd1aa5b5ae33cc7250264ffaa3c306d9aab90c75868c6b08c860ce95461bd2d9ce3ef83403fb110306cde9f5313081ffebe12
Output for 7.2.9
1a9f7773c9e96574c0d070c5e5fb8e531c9c7c2353db8114c4e1b040720c7c4bda84efbd3543d375f78e2e4a039001552c88456b046d900e594e371f11308dd5ed835dae7f1214c260d49d6e4ddd
Output for 7.2.8
c336e2f1aef3ffba4946d8a8528dbdf63e6b194165e83f33bb889913338bd6b98161371d0f49015086ba8671d36c4bd99783d8c37fcb6193606e124b4a841f56d03de1c845dd2e77adf3ef0ddc55
Output for 7.2.7
0cf9167bb2d9b3856d7d3351e12852703453538563ab8272f559d1d4230fa66c2247631274e4f298199fdc11a0052e6eaa1ae14a3bbdd78676e4bf881680ec9f148c251f9fe3a2a671ae7d68782f
Output for 7.2.6
e480b6a32953af890e5e48dca27662cf54dfa912093b3c6a1978344706a0090ac2cad0d694920b77bccd1452ac620b7ab8cb1ddd80af600dfef35c14aa05a115cdb7f7a3daa34db916406b2706b7
Output for 7.2.5
8e256fb7d4f9e08ce30b0273ef709774dfa02968a7fbc250d579d2778c2a83c891fc65659c758605aaca264c6836970078be602ca03404a2b939362e4ba1f4ae0176de40bdccf93e128b5153b3ee
Output for 7.2.4
773ced602ab75415148b544d0e6f7d3d6e3c4b97e1b29132e67afeff93c6a9cd39cba0c2e4b4654452e9ef2d06b6bc9c108f41fe5403a2dba0aedb79e35db4d620e7ea0744138767bbabc4d20201
Output for 7.2.3
f21690fd74c6224c89c4128afa60732f0102d59da7e73fdc7e40525ffa3d235d41c5912b2cdc9dc9bf03b767754341dc673d4450557ba8415d8e1379e1b9384e42575b1ec88522d244751e9f8b9e
Output for 7.2.2
4c10b72f6c7e566798f1c1799fa62b95e76e2781811d7ed118a61837db7bc1c8c8ef58fa162a25dabd7912336c594f110e568f27880593eb9caa75294f7ff09d38aed414b4a560cc8dbf3646d185
Output for 7.2.1
4db670931951434128252a1bec6f1ba1229e72e0641ca739c27c2af44c359a19f34731dec19298b78e0de6cc985fd79c866338b3427351ca2be621c5c2ea9d47983a750ccbd3bdfb8997d2cb89c2
Output for 7.2.0
ce0155c38aafd0e307e464204d9a9edde6cd716b0fb29d0d80452021e7013d514746b3ef91633386f14fa462b410462465a2bef2a7edc69c42296ece1963051019d6fd557e6ef8930a2ca9368355
Output for 7.1.25
fda603aef816b155272f15ba41e80afa82b0c1a64bdb5dc8b28328e9cdea7fde828b613f12ae7795295d319ae97c709702f60c4892cdc760b821769a994ffa79d08561587f1265088502fb3d7279
Output for 7.1.20
d4a2db0f92cff5d1fe1b39e22abbbc48704a9f3bfa779ef9ebb907e03967d325fe56aa9b7f38d887def81122e07a10f08ff45e367fe33689b54ebec5f238a23f9c321d839f0454ccf69371c31189
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.