3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x['token'] = [bin2hex(random_bytes(16))]; var_dump(json_encode($x));
based on UYWTT
Output for 7.3.0alpha1
string(46) "{"token":["7de8bc871b9353a81909373996c3de3c"]}"
Output for 7.2.6
string(46) "{"token":["b271641eebd4aaa929b4a5bae62583e0"]}"
Output for 7.2.0
string(46) "{"token":["7bf51bc58248ea7f97bad2c7471418f0"]}"
Output for 7.1.10
string(46) "{"token":["ef9e99f4488fde38b943917893c2ed88"]}"
Output for 7.1.7
string(46) "{"token":["da717a2d628d776f6a761f3e44ad3a27"]}"
Output for 7.1.6
string(46) "{"token":["732010e623e168740c57a156e987c728"]}"
Output for 7.1.5
string(46) "{"token":["f712c8ffbdb8db5b38fd63b3ff7791ee"]}"
Output for 7.1.4
string(46) "{"token":["c36de98873590a6d8cc408d07724d65e"]}"
Output for 7.1.3
string(46) "{"token":["8cc9b7d4ed8113671fb4319ac1bbf785"]}"
Output for 7.1.2
string(46) "{"token":["1ed3efb70f4868fc4da7a1069aa7f44e"]}"
Output for 7.1.1
string(46) "{"token":["e8328d9de630696ede03f0643ac202a2"]}"
Output for 7.1.0
string(46) "{"token":["03f6d924933f1b068076cd9e90b14cca"]}"
Output for 7.0.20
string(46) "{"token":["e4232cfb3691776756a8b17a3d33ecb6"]}"
Output for 7.0.19
string(46) "{"token":["440250d40be4d44d137d248961b33093"]}"
Output for 7.0.18
string(46) "{"token":["f1a5141d12a92f059fc59952f71b534b"]}"
Output for 7.0.17
string(46) "{"token":["70d2f091ba8da2f07cab58b7f94d3cae"]}"
Output for 7.0.16
string(46) "{"token":["b857db1ad694f4101c640e50c56dd6fc"]}"
Output for 7.0.15
string(46) "{"token":["df836c73ab2cfe0033c2491e8218c7b4"]}"
Output for 7.0.14
string(46) "{"token":["9a489f87bebe84ba59122105f7245e30"]}"
Output for 7.0.13
string(46) "{"token":["78731a4f7100be0563a48c952135b92b"]}"
Output for 7.0.12
string(46) "{"token":["faea86c6eb9d51e7ff570eee9d93d45f"]}"
Output for 7.0.11
string(46) "{"token":["f4f16aa7c69e1b74a6eb331504697a5e"]}"
Output for 7.0.10
string(46) "{"token":["27410cd4db5b2382f966b6aadac33fe9"]}"
Output for 7.0.9
string(46) "{"token":["3c54a8bad8c275b76d6627d8b2917c3f"]}"
Output for 7.0.8
string(46) "{"token":["eb2130a1c8758ca660747976fa7d11ac"]}"
Output for 7.0.7
string(46) "{"token":["8fa572a6f8f7d6ed47e971b60b921194"]}"
Output for 7.0.6
string(46) "{"token":["b876ff88ff90e99ef12b15cb80a551fd"]}"
Output for 7.0.5
string(46) "{"token":["dab37cbe8d035d34bc7b9b2bfd122774"]}"
Output for 7.0.4
string(46) "{"token":["8fb094e5d169d7bc4cc5c139d71f3d25"]}"
Output for 7.0.3
string(46) "{"token":["bd445376e72cd4203eaed00def363e0f"]}"
Output for 7.0.2
string(46) "{"token":["afae934e8561e0df8d9631fae9c48ef1"]}"
Output for 7.0.1
string(46) "{"token":["4cbd5db44410f040fb8d5456f7bb3778"]}"
Output for 7.0.0
string(46) "{"token":["f82d8c9fbadeb3207d9ddc505a5941d4"]}"
Output for hhvm-3.15.4
string(46) "{"token":["67892ab83b93971634f319072d5fd8a1"]}"
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function random_bytes() in /in/jpdk0 on line 2
Process exited with code 255.