3v4l.org

run code in 300+ PHP versions simultaneously
<?php $secret = hex2bin('123456789ABCDEF0DEF1DEF2DEF3DEF4123456789ABCDEF0DEF1DEF2DEF3DEF4'); function encrypt128($str, $secret) { return mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $secret, base64_decode($str), MCRYPT_MODE_ECB); } function sslEncrypt128($str, $secret) { return base64_decode(openssl_encrypt($str, 'aes-256-ecb', $secret,OPENSSL_ZERO_PADDING)); } //var_dump(encrypt128('tc93Ex6l2GZIl8pEMLW13g==', $secret)); var_dump(sslEncrypt128(base64_encode('[03/20/18 13:28]'), $secret)); // lets assume you just called an openssl function that failed while ($msg = openssl_error_string()) echo $msg . "<br />\n";
Output for 7.1.20 - 7.1.33, 7.2.6 - 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.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
Fatal error: Uncaught Error: Call to undefined function openssl_encrypt() in /in/CHjuT:12 Stack trace: #0 /in/CHjuT(16): sslEncrypt128('WzAzLzIwLzE4IDE...', '\x124Vx\x9A\xBC\xDE\xF0\xDE\xF1\xDE\xF2\xDE\xF3\xDE...') #1 {main} thrown in /in/CHjuT on line 12
Process exited with code 255.
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 7.1.0 - 7.1.16, 7.2.0 - 7.2.4
string(0) "" error:0607F08A:digital envelope routines:EVP_EncryptFinal_ex:data not multiple of block length<br />

preferences:
164.82 ms | 409 KiB | 5 Q