3v4l.org

run code in 300+ PHP versions simultaneously
<?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 = '655646'; $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']);
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
string(64) "0ee23f3707ea86e882fb30c0ee8ce6154983ba0fd664de645bddd67a93af2569" Warning: Cannot modify header information - headers already sent by (output started at /in/RaqaJ:22) in /in/RaqaJ on line 24
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 string(64) "0ee23f3707ea86e882fb30c0ee8ce6154983ba0fd664de645bddd67a93af2569" Warning: Cannot modify header information - headers already sent by (output started at /in/RaqaJ:22) in /in/RaqaJ on line 24

preferences:
205.56 ms | 402 KiB | 286 Q