3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $encryptionKey = base64_decode("xErBbroP73A4DPhHAIEMul6zf9lenyuEno04tmdWZ3g="); $checksumKey = base64_decode("xPwnkqGeQXmMJom48pSEdRmU1MXQ8kr3jCey20d+eu8="); $timestamp = floor(microtime(true)*1000); $message = $timestamp.";friendfinder123"; echo "<P>Message: $message\n"; $blockSize = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $padding = $blockSize - (strlen($message) % $blockSize); $message .= str_repeat(chr($padding), $padding); echo "<P>Message 1: $message\n"; srand(time()); $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($ivSize,MCRYPT_RAND); $encryptedMessage = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $encryptionKey, $message,MCRYPT_MODE_CBC, $iv); $newmessage = base64_encode($encryptedMessage) echo "<P>newmessage: $newmessage\n"; $hmac = hash_hmac("sha1", $encryptedMessage.$iv, $checksumKey, true); $authorizationToken = base64_encode($encryptedMessage.$iv.$hmac) echo "<P>authorizationToken: $authorizationToken \n"; ?>
based on aMev0
Output for 5.4.0 - 5.4.34
Parse error: syntax error, unexpected 'echo' (T_ECHO) in /in/cHmKS on line 20
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_ECHO in /in/cHmKS on line 20
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_ECHO in /in/cHmKS on line 20
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/cHmKS on line 20
Process exited with code 255.