3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $y = new stdClass; $x['token'] = [bin2hex(random_bytes(16))]; $y->token = $x; var_dump(json_encode($y));
based on jpdk0
Output for 7.2.6
string(56) "{"token":{"token":["93f0ec2275428dd915b841831deb957c"]}}"
Output for 7.2.0
string(56) "{"token":{"token":["8fa028dbce61a91591923c6c99efc2de"]}}"
Output for 7.1.10
string(56) "{"token":{"token":["cafbe1a6dd69be4625b1d47d11f9fec2"]}}"
Output for 7.1.7
string(56) "{"token":{"token":["36f74b7088d144b126f60a074b564e7e"]}}"
Output for 7.1.6
string(56) "{"token":{"token":["030827952ec6f1f0c01df15dc70f037f"]}}"
Output for 7.1.5
string(56) "{"token":{"token":["a34425f3ed4c1b1fdb2b3f2c1bfdb64b"]}}"
Output for 7.1.4
string(56) "{"token":{"token":["4f01dd0b0145328219fab4e31a90223f"]}}"
Output for 7.1.3
string(56) "{"token":{"token":["cdf6a9e8662e421bd89379cca8b79b11"]}}"
Output for 7.1.2
string(56) "{"token":{"token":["ad80a9bf9283696c3042fd34d2f4b3c5"]}}"
Output for 7.1.1
string(56) "{"token":{"token":["d5a03320fdbe4c39aa8edf7ff17df165"]}}"
Output for 7.1.0
string(56) "{"token":{"token":["97a2ede498ffd306595cd2529b00b615"]}}"
Output for 7.0.20
string(56) "{"token":{"token":["7e56a62465fab180a595b448b68529e2"]}}"
Output for 7.0.19
string(56) "{"token":{"token":["e29a6b7d50790ace62e3b4b4c069846d"]}}"
Output for 7.0.18
string(56) "{"token":{"token":["82be08bde0017049649fe3cefed00310"]}}"
Output for 7.0.17
string(56) "{"token":{"token":["afdf6bbf2c93fea3f5e7a799e6bfaf88"]}}"
Output for 7.0.16
string(56) "{"token":{"token":["bc8132e13376d4727c3c2d55c53f40c5"]}}"
Output for 7.0.15
string(56) "{"token":{"token":["2463c181abed84bafab0697b08136cfd"]}}"
Output for 7.0.14
string(56) "{"token":{"token":["3ed0c253756f0b8ccc6f1a39df2625ca"]}}"
Output for 7.0.13
string(56) "{"token":{"token":["35c8a5863df884dbcffaa55b950c32ee"]}}"
Output for 7.0.12
string(56) "{"token":{"token":["0a4ced32fb239174b9fdc8e9aa35748c"]}}"
Output for 7.0.11
string(56) "{"token":{"token":["19b58035f2f5375e79d09af3f840dda0"]}}"
Output for 7.0.10
string(56) "{"token":{"token":["5b01dd66f4ab4a3815bc271322af0d24"]}}"
Output for 7.0.9
string(56) "{"token":{"token":["69087aaaa394ebfd829eee470abfc843"]}}"
Output for 7.0.8
string(56) "{"token":{"token":["6cdd662134dc26e85e5fc0a24000905c"]}}"
Output for 7.0.7
string(56) "{"token":{"token":["c09590e48075e3684b4f6f4ac642c778"]}}"
Output for 7.0.6
string(56) "{"token":{"token":["fa5529101f374202b6fd595a7c9c771e"]}}"
Output for 7.0.5
string(56) "{"token":{"token":["ea6a2b2c4f196f981170dbf27e445e18"]}}"
Output for 7.0.4
string(56) "{"token":{"token":["594fda330db054e8efd4397daf3b76d3"]}}"
Output for 7.0.3
string(56) "{"token":{"token":["f14c824df832ec0e97967574677f2692"]}}"
Output for 7.0.2
string(56) "{"token":{"token":["624b74c2cc80b770c8b0acab53af12d2"]}}"
Output for 7.0.1
string(56) "{"token":{"token":["e02a8b93ce63db91a57d4e86a44a75b1"]}}"
Output for 7.0.0
string(56) "{"token":{"token":["b7ba132c494433e0fbb4c569b6c4f744"]}}"
Output for hhvm-3.15.4
string(56) "{"token":{"token":["0f145ec02092242ede650817a09c959c"]}}"
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function random_bytes() in /in/ScujO on line 4
Process exited with code 255.