3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $token = hash('sha512', mt_getrandmax() . microtime(TRUE)); $_SESSION['token'] = $token; ?> <form action="" method ="POST"> <input type="hidden" name ="token" value="<?= $token ?>"> <input type="text" name="search" id="search" value ="<?= isset($_POST['search']) ? $_POST['search'] : "" ?>" > <input type="submit" value="Go"> </form> <?php if (isset($_POST['token'])) { echo $_POST['token'] == $_SESSION['token'] ? 'true' : 'false'; var_dump($_SESSION); echo '<br />'; echo '<br />'; var_dump($_POST); }
Output for 7.1.0
<form action="" method ="POST"> <input type="hidden" name ="token" value="799583fbc37c476150ae61cb660f4cef4e02b880b513b7618be14f18cf7eef5bea394f1740db7b335db88919cfafde74d7bec1e64ee2b253fe0f818b0a7bb0a8"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.16, 5.4.20, 7.0.2, 7.0.14
<form action="" method ="POST"> <input type="hidden" name ="token" value="dcdb0abd322694398cde21d49778ac4c23cced755147c386940707f5d6233447d11a9a3da7171b12a70eee40030fc560785684285c47c81349d18bc69861343e"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 7.0.6, 7.0.10
<form action="" method ="POST"> <input type="hidden" name ="token" value="2f4235479bcfa4cddbf9c56ca7903bb219e778eb4522e52ec6690f1be9fcd541b88c0b1eb8f2dcf58c7f4383711314a99b1d721c35f7df533a347f163315b84f"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 7.0.8 - 7.0.9
<form action="" method ="POST"> <input type="hidden" name ="token" value="49afee0e2d3862de074ce7d98d2eb98f5677f2fdeb8624740fef6f10e1b3105c39dd32944fd2c1a1489b2284c41a77bdb4ce6ae3b4519355a14cbc4080dddd99"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.29, 5.4.32, 5.4.37, 5.4.40, 5.5.11, 5.5.28, 5.6.16, 7.0.0, 7.0.7
<form action="" method ="POST"> <input type="hidden" name ="token" value="2b7d68220afef978f2162e24cd71c781eab4a8d26285954986452668ecb5f7f813946c54d90d7a57b7089b486fc81d40a3125a4768206021caedbf59a944d231"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.0, 7.0.5
<form action="" method ="POST"> <input type="hidden" name ="token" value="d3f7ea7e218e641f220d4d1b1af9ec6b3db6fa242c9aa15b7ea94f4b6ed5afb7b147e2cb0ce796a8cc48b2fd0e14dba152d247546ae8e7a917799a231b20cb59"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.12, 5.5.23, 5.5.36 - 5.5.37, 5.6.6, 5.6.24, 7.0.1, 7.0.4
<form action="" method ="POST"> <input type="hidden" name ="token" value="1495c3839eafeac8727b033f444f480a0219822b686dc55c0fd57e84f5a6d92bd55f235beed1b328a79071d4d59e6368bb3121e2de35ab75b0f043470644379f"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.25, 5.4.45, 5.5.32, 5.6.22, 5.6.25, 7.0.3
<form action="" method ="POST"> <input type="hidden" name ="token" value="4d95e244ce52f80e4f2a64272ed4285a3c842cf5463d8eb4f30a97841cd8f0e57f29da5cd9ee786215bfd474075f1a3001e9ba808bebbded18993e2a16136e3d"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for hhvm-3.12.0
<form action="" method ="POST"> <input type="hidden" name ="token" value="7eb609c53f18a2bf2ca1557ee13d07acad33abedb83829a9f637117df1a635b60deb2c9428fcde499a68e7c25954be89beac339bbb4adc3551740e4fecacd64c"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for hhvm-3.10.0
<form action="" method ="POST"> <input type="hidden" name ="token" value="88d109c6199e386821ff7c5156521a73a6d45b48ad4296aa0745c9a283d84cdddd5b0ebc5b864ef18f05fd43898a71d6fe8bf3097f621c3ca833242a7b024d42"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.34, 5.6.0, 5.6.5, 5.6.28
<form action="" method ="POST"> <input type="hidden" name ="token" value="b438112d902183d306b269e2c49e90039191914a06ddf162b018f2c80750726c25c82537978a10a7533e3660a2a6e36b542ed46a4cf6366a408778ce5a7d9e2e"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.6.23
<form action="" method ="POST"> <input type="hidden" name ="token" value="b33dec6dbf91b83258a67c6479be7df31c70055d41444353881d25b4e64f890085f72fa0c46e552c00978d0dbe7b91b519fc0feabf367eb4ec85bedefd10c989"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.3, 5.6.21
<form action="" method ="POST"> <input type="hidden" name ="token" value="bc56ce4969058ef3104ec2fae3e81042dc431e97dee542f589f83cb5194d69df4700ea7e350576eb0cb06d27bad700d69b4b4a53afb527e1012c89e91991f938"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.6.20
<form action="" method ="POST"> <input type="hidden" name ="token" value="c7369e27d78a98cd7d81a8d011fed034e06cf395ab007ecb5a41c8c19d756e3868f68d73b9686fb20031999275d3a85a75c7b88adb698c908b1c3c402a3a735d"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.1, 5.5.9, 5.5.18, 5.5.31, 5.6.3, 5.6.7, 5.6.13, 5.6.19
<form action="" method ="POST"> <input type="hidden" name ="token" value="8d5b23792bbf0e23f0b38816e29bd0fcf01d02e8c3ec62c8b05c74012027d87c628a995c343487e157de5ee1daa54a717d47f9587d9f4426c86df7fc2f130e3e"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.25, 5.5.38, 5.6.4, 5.6.8, 5.6.18
<form action="" method ="POST"> <input type="hidden" name ="token" value="cc0a6731cfc48c3dd50b87606444485f6c946e65f3a3ab29c977662d577c0c265ab73c1cedeb321c3ce879b1c5899a0573fe4aa61822a6782221b99e0288ace6"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.6, 5.5.8, 5.5.10, 5.6.2, 5.6.15, 5.6.17
<form action="" method ="POST"> <input type="hidden" name ="token" value="76ff3b9dff07581cd7d314c933b5ddf967a841dd55b15da9e45ec3defc922a98fa50670236661603fbaf4a0f81ee3b412d42d1ccd0b456934a6b4d4f704ab712"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.4 - 5.5.5, 5.6.14
<form action="" method ="POST"> <input type="hidden" name ="token" value="a45ca4f41f3f510edc39a9901fdbc2dbd2bff5a0d40ea28777aabea85a34a9f20b28fb36df01714a4bb44f15271c5a6d6a7e947230e104351f57e7f776a3ee69"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.26, 5.5.21, 5.6.9, 5.6.11 - 5.6.12
<form action="" method ="POST"> <input type="hidden" name ="token" value="9dba25a28de18beef100ddd37be35b17d58e189d7481cd158e6a6344c85539f967ecd0885be38cf3d02c5e7f466ad2c6aa96518206ad8a9061604bd7a3d497f8"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.21, 5.4.23, 5.5.27, 5.6.1, 5.6.10
<form action="" method ="POST"> <input type="hidden" name ="token" value="c33e19f4ed6ae432fa5ebaf2c17382c14497db96c4408d6b38afc41eba6a541f2f65e669e3f70d92a6f6520e6e3f42a2ec7226a98c9436dc839d2b8f6d8d9450"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.18, 5.4.22, 5.4.28, 5.4.34, 5.4.36, 5.4.42, 5.5.35
<form action="" method ="POST"> <input type="hidden" name ="token" value="993e20711d522eafbb2ee34183e6172d8387b4209b37e8586730195cca87f274ef51542385642653824887205e2fbd00093aab8bfdc70114788721e2e1f4b3f6"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.27, 5.4.39, 5.5.16, 5.5.33
<form action="" method ="POST"> <input type="hidden" name ="token" value="733b569b69bef9cadc63e9cc617907deede434e3747e75bb3f2d8dc61c68a8499189bdb9a0ffa7405d512f10de1fc7ec8212d6da9c162ab358e0f3bfea703d6c"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.19, 5.4.43, 5.5.30
<form action="" method ="POST"> <input type="hidden" name ="token" value="39accdffb7d1d4b8e0596f512dfc3b5ebe55884d1cb1198ffbae8d9dbe1ed1e1d53211ee014b87afafef2398d8599bf8ae25299fa18887c340d7e8b31586f6eb"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.7, 5.5.13, 5.5.22, 5.5.24, 5.5.26, 5.5.29
<form action="" method ="POST"> <input type="hidden" name ="token" value="94ea71f5a841d742f74779c95a542c970215cbd3979756d06ba191e8c934d7158f0c1c5bedfd5af703cd6815905f86a7fcb6d56ff8830eac792baf11b506563a"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.31, 5.5.20
<form action="" method ="POST"> <input type="hidden" name ="token" value="4069eba39627d3063cef149458d067b33ae8c1e4b278f46f42bcc5fd7b46f05cf0287f40558ae4b96e533e41db345b48a4ccedcbc59cbc186da9a46684920c86"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.19
<form action="" method ="POST"> <input type="hidden" name ="token" value="ad8a63f9cd8bdb8288b40f720defde511af0d75e32c4479db86c3bb1119c8e1bb11a87ac5e6e9ec24545163b277aa9886ba4f97d211ded37dc4f1bd24acffef8"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.15
<form action="" method ="POST"> <input type="hidden" name ="token" value="2c31e071a5ea231d936e082459445a0bcf5422ac1098f862f3107ffab44925bfadca0adc95d943a0ec4e29e509976daf9f6f1f04eb1b05b7c37f482c738b2eaf"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.14
<form action="" method ="POST"> <input type="hidden" name ="token" value="7fb361b9d61b82a225b02a51f70f2cde629071a6d8df1cf8fa5d8dfc630e9180e98cdca44b09e43d96956db4772977c9755ecd4db21dca98db1bb0377a702554"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.5.2
<form action="" method ="POST"> <input type="hidden" name ="token" value="339877c4f33d08a6b155e2068dc179d3e048983a187912f832484dbb3e787df063b31fbe201c74722d131af7643241656f87f005dd00bf2477e989266c129a01"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.41, 5.4.44
<form action="" method ="POST"> <input type="hidden" name ="token" value="28c2c6421543f35298d94ef97c5c8de255d99ba583751e9fcc1e334aafc9e412e842fc13b5981e7ce86d202e2eea8c8d2e7e7628064b4fe535c1436139d637ee"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.17, 5.4.38
<form action="" method ="POST"> <input type="hidden" name ="token" value="89fcabf62d62661eab0a098723b7854e77bad2069ad641436d7379efcf52daff274c2b0fb8211981dea4260a3387aedad637bf668af65fd6808fe44cdab76977"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.24, 5.4.30, 5.4.35
<form action="" method ="POST"> <input type="hidden" name ="token" value="2f7fdcf2477a531847133fa61c99f1f5c8d698ec3c4b27afde9b85852971c8870f403b121359d563be4c07714f8e5073572ccb6fdbf858ecf9e9337794266d56"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.7, 5.4.15
<form action="" method ="POST"> <input type="hidden" name ="token" value="5e6d0f041552f55a06f919e731b5f44f3a6cba3577ad66a672445fb4b090596afb648779b8f8a4b8a073363029273e59276048234f9d5bc9ec3ac8485a1d7fb1"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.2, 5.4.4, 5.4.9, 5.4.14
<form action="" method ="POST"> <input type="hidden" name ="token" value="1a8bd98adf82af4bf3c1af50046c824fa4668816c40a4d7843d75a840e7de4d7a735d113ffe399152bb981f7a3f893e5d1547c1d67933c4650412d65b7e14a4b"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.1, 5.4.3, 5.4.5 - 5.4.6, 5.4.13
<form action="" method ="POST"> <input type="hidden" name ="token" value="cba4d430cb8812e738d939c70014568682512ad4f2b5b2d59922169dde88413739ec78a04d0444e27d4fb1c5855b68e77b8fb8ea08b1d40c38484bf9732a76e8"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.10, 5.4.12
<form action="" method ="POST"> <input type="hidden" name ="token" value="0b8d46bf635acf8560dde8c570e095bcead430a369ffc03971bf71b1eae15ff3ab9df7db6dc969180994bc1919afa91ae4290e287ea0b296286548be56f0d13e"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.11
<form action="" method ="POST"> <input type="hidden" name ="token" value="fcfeaf60edf72b46c3440cceefa31ae9519fed18d07eb80087650e38e51200ee86b1788173012a57d7b27c2389881dba1547b7cc767f3c1c7031b9e361c0fdd8"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.8
<form action="" method ="POST"> <input type="hidden" name ="token" value="b6aae4307d1ad9f84c7e9722efade7e7fad7154de9ff6273887270bc9edadd759fde0245836cd0056efaafb47fcf7942fb0ca9b8dadaf2faef2e2e5824e3820e"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.4.0
<form action="" method ="POST"> <input type="hidden" name ="token" value="8947ef10ea5b4afc4245a7267538756125cc54d92de0878803f5145a7e0ba73b70dfc99641c30d3c0078c8436dc40de8c3f9970eb682230451c05fdc282a71c1"> <input type="text" name="search" id="search" value ="" > <input type="submit" value="Go"> </form>
Output for 5.1.2 - 5.3.29
<form action="" method ="POST"> <input type="hidden" name ="token" value="<?= $token ?>"> <input type="text" name="search" id="search" value ="<?= isset($_POST['search']) ? $_POST['search'] : "" ?>" > <input type="submit" value="Go"> </form>
Output for 5.0.0 - 5.1.1
Fatal error: Call to undefined function hash() in /in/f4jJI on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: hash() in /in/f4jJI on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: hash() in /in/f4jJI on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: hash() in /in/f4jJI on line 2