3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 = '1234512345'; $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.0 - 7.2.0
Warning: openssl_encrypt(): IV passed is only 10 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/XZdke on line 13 Warning: openssl_decrypt(): IV passed is only 1 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/XZdke on line 15 Warning: openssl_decrypt(): The tag cannot be used because the cipher method does not support AEAD in /in/XZdke on line 15
Output for 5.4.15 - 7.0.20
Warning: openssl_encrypt(): IV passed is only 10 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/XZdke on line 13 Warning: openssl_decrypt() expects at most 5 parameters, 6 given in /in/XZdke on line 15
Output for 5.3.18 - 5.4.14
Fatal error: Call to undefined function openssl_encrypt() in /in/XZdke on line 13
Process exited with code 255.