3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tempToken = "a5c4e484-15f5-442b-b30d-84eb1848aad389ea132c-ef53-49b7-808c-8f015e93c4eb"; $clearText = "AuthToken=a5c4e484-15f5-442b-b30d-84eb1848aad389ea132c-ef53-49b7-808c-8f015e93c4eb&PayerId=5732052602226956&PaymentProcessType=CreditCard&ProcessMethod=None&PaymentMethodStorageOption=None&ReturnURL=https://il01addproc.propay.com:443/Return.aspx "; // $tempToken = "1f25d31c-e8fe-4d68-be73-f7b439bfa0a329e90de6-4e93-4374-8633-22cef77467f5"; // $clearText = "AuthToken=1f25d31c-e8fe-4d68-be73-f7b439bfa0a329e90de6-4e93-4374-8633-22cef77467f5&PayerID=2833955147881261&Amount=10.00&CurrencyCode=USD&ProcessMethod=Capture&PaymentMethodStorageOption=None&InvoiceNumber=Invoice123&Comment1=comment1&Comment2=comment2&echo=echotest&ReturnURL=https://il01addproc.propay.com:443/Return.aspx&ProfileId=3351&PaymentProcessType=CreditCard&StandardEntryClassCode=&DisplayMessage=True&Protected=False"; // Encode the TempToken string in UTF-8 $encodedTempToken = utf8_encode($tempToken); // Get the MD5 hash of $encodedTempToken in raw binary format with a length of 16 $md5Hash = md5($encodedTempToken, TRUE); // Encode the name value string in UTF-8 $encodedNameValueString = utf8_encode($clearText); echo strlen($encodedNameValueString) . "\n"; // Pad the name value string using pkcs5_pad $blocksize = mcrypt_get_block_size('rijndael_128', 'cbc'); $pad = $blocksize - (strlen($encodedNameValueString) % $blocksize); $encodedNameValueString = $encodedNameValueString . str_repeat("X", $pad); echo strlen($encodedNameValueString) . "\n"; echo $encodedNameValueString; echo "\n"; // Use AES-128 encryption to encrypt the name value string with the key and IV both being equal to the MD5 hash of $encodedTempToken $aes128 = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $md5Hash, $encodedNameValueString, MCRYPT_MODE_CBC, $md5Hash); echo $aes128; echo "\n"; // Use Base64 encoding to send the resulting bytes of the encrypted name value string $settingsCipher = base64_encode($aes128); echo $settingsCipher;
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
Deprecated: Function utf8_encode() is deprecated in /in/62aW0 on line 13 Deprecated: Function utf8_encode() is deprecated in /in/62aW0 on line 19 256 Fatal error: Uncaught Error: Call to undefined function mcrypt_get_block_size() in /in/62aW0:24 Stack trace: #0 {main} thrown in /in/62aW0 on line 24
Process exited with code 255.
Output for 7.0.6 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
256 Fatal error: Uncaught Error: Call to undefined function mcrypt_get_block_size() in /in/62aW0:24 Stack trace: #0 {main} thrown in /in/62aW0 on line 24
Process exited with code 255.
Output for 5.4.34 - 5.4.45, 5.5.24 - 5.5.34, 5.6.7 - 5.6.20, 7.0.0 - 7.0.5
256 272 AuthToken=a5c4e484-15f5-442b-b30d-84eb1848aad389ea132c-ef53-49b7-808c-8f015e93c4eb&PayerId=5732052602226956&PaymentProcessType=CreditCard&ProcessMethod=None&PaymentMethodStorageOption=None&ReturnURL=https://il01addproc.propay.com:443/Return.aspx XXXXXXXXXXXXXXXX RH�vq[�b;��~ �'&`��B�~E~ZH ӹ�a�U�E��]Va�^� �Iweng�5�P�- �������JV���c=%��U�Ui�0��P�"qՖ296U>?9P����y�;��}��LR�Ӧ^��xL�?m���P%���k '��o���mz �|I`�eB���� y�+�]�S����w���?�K �P�uv��1�q�Ϊ�a�@g�\���k6 ���=#a,W�P��Q��Μ}������F�����V�M1u�E�M@}X UkiWdnFb0WI7sQjOEn4LtycmYLUUy0KOfkV+WkgM07mMYY5V4kW9n11WYd1ehQrl9kl3ZW5nkTWZUIMtEg2/lPa5BY/Q0UpWvIzpYz0ljexV1lVppDChkVC3InHVljI5NlU+PzlQ8RCr6xeJeeM7HPDSff+pTFLv06Zen8V4TOg/baLlFJlQECWUqKVrCyev12+T+Q+sbXoNtnxJYJcOZUKAoqjODXnnmSvgXfKmU+l/97n+dwWR3PEeP8BLDfEAHR9QGZJ1dgewgDEPjHGyB86qo2HYQGesXLLQwYxrNgyMv5Y9I2EsV4tQxcEQzlHS4M6cfYim79wZttJG/KsPrtf75Fb1TTF19kWkTUASfVg=
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.32, 5.5.35, 5.6.21 - 5.6.28
256 Fatal error: Call to undefined function mcrypt_get_block_size() in /in/62aW0 on line 24
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Warning: Wrong parameter count for md5() in /in/62aW0 on line 16 256 Fatal error: Call to undefined function: mcrypt_get_block_size() in /in/62aW0 on line 24
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Warning: Wrong parameter count for md5() in /in/62aW0 on line 16 256 Fatal error: Call to undefined function: mcrypt_get_block_size() in /in/62aW0 on line 24
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Wrong parameter count for md5() in /in/62aW0 on line 16 256 Fatal error: Call to undefined function: mcrypt_get_block_size() in /in/62aW0 on line 24

preferences:
214.75 ms | 402 KiB | 315 Q