3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $encrypt = MCRYPT_RIJNDAEL_128; $key = 'X{5G5?X2#Q%8;FE=Z"ZJde:;y-V--+WK'; $mode = MCRYPT_MODE_ECB; //$iv = mcrypt_create_iv(mcrypt_get_iv_size($enc, $mode), MCRYPT_DEV_URANDOM); $data = 'password'; $password = mcrypt_encrypt($encrypt, $key, $data, $mode); echo $password; echo PHP_EOL; $decrypt = mcrypt_decrypt($encrypt, $key, $password, $mode); echo $decrypt;
based on 96atr
Output for 7.2.0
Warning: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' (this will throw an Error in a future version of PHP) in /in/oE5i5 on line 2 Warning: Use of undefined constant MCRYPT_MODE_ECB - assumed 'MCRYPT_MODE_ECB' (this will throw an Error in a future version of PHP) in /in/oE5i5 on line 4 Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/oE5i5:7 Stack trace: #0 {main} thrown in /in/oE5i5 on line 7
Process exited with code 255.
Output for 7.0.6 - 7.1.10
Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /in/oE5i5 on line 2 Notice: Use of undefined constant MCRYPT_MODE_ECB - assumed 'MCRYPT_MODE_ECB' in /in/oE5i5 on line 4 Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/oE5i5:7 Stack trace: #0 {main} thrown in /in/oE5i5 on line 7
Process exited with code 255.
Output for 5.4.1 - 5.5.34, 5.6.8 - 5.6.20, 7.0.0 - 7.0.5
�[Mb�1b��!��7�1w password
Output for 5.3.18 - 5.3.29, 5.5.35, 5.6.21 - 5.6.28
Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /in/oE5i5 on line 2 Notice: Use of undefined constant MCRYPT_MODE_ECB - assumed 'MCRYPT_MODE_ECB' in /in/oE5i5 on line 4 Fatal error: Call to undefined function mcrypt_encrypt() in /in/oE5i5 on line 7
Process exited with code 255.