3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $_POST['host'] = 'www.seznam.cz'; $_POST['hmac'] = 'ea490cb67d21d43592c2b20a5339da2b373c2de39e4a5bcfab9872d448955376'; $_POST['nonce'] = true; if ( empty($_POST['nonce']) || empty($_POST['hmac']) || empty($_POST['host']) ) { header('HTTP/1.0 400 Bad Request'); exit; } $secret = '6556464'; $secret = hash_hmac('sha256', $_POST['nonce'], $secret); $hmac = hash_hmac('sha256', $_POST['host'], $secret); var_dump($hmac); if ($hmac !== $_POST['hmac']) { header('HTTP/1.0 403 Forbidden'); exit; } var_dump('lol'); echo exec("host " . $_POST['host']);
based on RaqaJ
Output for 5.6.0 - 5.6.30, 7.1.0 - 7.3.0beta1
string(64) "7d288586b5dc76be175e64b660ffd978c1ce4eb846befefe66609573f856d0fa" Warning: Cannot modify header information - headers already sent by (output started at /in/bCilf:22) in /in/bCilf on line 24
Output for hhvm-3.22.0
string(64) "7d288586b5dc76be175e64b660ffd978c1ce4eb846befefe66609573f856d0fa" Warning: Cannot modify header information - headers already sent in /in/bCilf on line -1
Output for hhvm-3.18.5 - 3.21.3

Process exited with code 153.