3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string_to_encrypt = <<<END This is a test There a new lines and "quotes" in here. I don't know whether this'll work! END; $password = '12345'; $iv = '1234567890123456'; $enc = openssl_encrypt($string_to_encrypt, 'AES-256-CBC', $password, 0, $iv); echo openssl_decrypt($enc, 'AES-256-CBC', 'AES-256-CBC', $password, 0, $iv);
Output for 7.1.20 - 7.1.25, 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.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to undefined function openssl_encrypt() in /in/XJumc:13 Stack trace: #0 {main} thrown in /in/XJumc on line 13
Process exited with code 255.
Output for 7.1.0 - 7.1.10
Warning: openssl_decrypt(): IV passed is only 1 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/XJumc on line 15 Warning: openssl_decrypt(): The tag cannot be used because the cipher method does not support AEAD in /in/XJumc on line 15
Output for 5.4.15 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20
Warning: openssl_decrypt() expects at most 5 parameters, 6 given in /in/XJumc on line 15
Output for 5.4.1 - 5.4.14
Fatal error: Call to undefined function openssl_encrypt() in /in/XJumc on line 13
Process exited with code 255.

preferences:
199.08 ms | 401 KiB | 242 Q