3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo openssl_get_cipher_methods; $textToEncrypt = "hello"; $encryptionMethod = "aes-256-cbc"; $secretHash = "123455"; $iv = "123456789012"; $encryptedMessage = openssl_encrypt($textToEncrypt, $encryptionMethod, $secretHash, 0, $iv); $decryptedMessage = openssl_decrypt($encryptedMessage, $encryptionMethod, $secretHash, 0, $iv); echo openssl_get_cipher_methods;
based on 5SPnr
Output for 7.2.0 - 7.3.0rc3
Warning: Use of undefined constant openssl_get_cipher_methods - assumed 'openssl_get_cipher_methods' (this will throw an Error in a future version of PHP) in /in/7jF97 on line 2 openssl_get_cipher_methods Fatal error: Uncaught Error: Call to undefined function openssl_encrypt() in /in/7jF97:7 Stack trace: #0 {main} thrown in /in/7jF97 on line 7
Process exited with code 255.
Output for 7.0.30, 7.1.17 - 7.1.20
Notice: Use of undefined constant openssl_get_cipher_methods - assumed 'openssl_get_cipher_methods' in /in/7jF97 on line 2 openssl_get_cipher_methods Fatal error: Uncaught Error: Call to undefined function openssl_encrypt() in /in/7jF97:7 Stack trace: #0 {main} thrown in /in/7jF97 on line 7
Process exited with code 255.
Output for 5.6.30, 7.1.0 - 7.1.16
Notice: Use of undefined constant openssl_get_cipher_methods - assumed 'openssl_get_cipher_methods' in /in/7jF97 on line 2 openssl_get_cipher_methods Warning: openssl_encrypt(): IV passed is only 12 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/7jF97 on line 7 Warning: openssl_decrypt(): IV passed is only 12 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/7jF97 on line 8 Notice: Use of undefined constant openssl_get_cipher_methods - assumed 'openssl_get_cipher_methods' in /in/7jF97 on line 9 openssl_get_cipher_methods
Output for hhvm-3.22.0
Notice: Use of undefined constant openssl_get_cipher_methods - assumed 'openssl_get_cipher_methods' in /in/7jF97 on line -1 openssl_get_cipher_methods Warning: IV passed is only 12 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/7jF97 on line -1 Warning: IV passed is only 12 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/7jF97 on line -1 Notice: Use of undefined constant openssl_get_cipher_methods - assumed 'openssl_get_cipher_methods' in /in/7jF97 on line -1 openssl_get_cipher_methods
Output for hhvm-3.18.5 - 3.21.3
Notice: Use of undefined constant openssl_get_cipher_methods - assumed 'openssl_get_cipher_methods' in /in/7jF97 on line 2 openssl_get_cipher_methods Warning: IV passed is only 12 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/7jF97 on line 7 Warning: IV passed is only 12 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/7jF97 on line 8 Notice: Use of undefined constant openssl_get_cipher_methods - assumed 'openssl_get_cipher_methods' in /in/7jF97 on line 9 openssl_get_cipher_methods