3v4l.org

run code in 300+ PHP versions simultaneously
<?php $encrypt = MCRYPT_RIJNDAEL_128; $key = 'somethingisabitc'; $mode = MCRYPT_MODE_CBC; //$iv = mcrypt_create_iv(mcrypt_get_iv_size($enc, $mode), MCRYPT_DEV_URANDOM); $data = 'password'; $password = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_ECB); echo $password;
Output for 8.1.24 - 8.1.28, 8.2.11 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Undefined constant "MCRYPT_RIJNDAEL_128" in /in/5EKgb:2 Stack trace: #0 {main} thrown in /in/5EKgb on line 2
Process exited with code 255.
Output for 7.2.0, 7.2.9 - 7.2.14, 7.2.16 - 7.2.26, 7.3.1 - 7.3.13, 7.4.0 - 7.4.1
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/5EKgb on line 2 Warning: Use of undefined constant MCRYPT_MODE_CBC - assumed 'MCRYPT_MODE_CBC' (this will throw an Error in a future version of PHP) in /in/5EKgb on line 4 Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/5EKgb:7 Stack trace: #0 {main} thrown in /in/5EKgb on line 7
Process exited with code 255.
Output for 5.5.36, 5.6.0, 5.6.6, 5.6.9, 5.6.13 - 5.6.14, 5.6.16 - 5.6.18, 5.6.27, 5.6.29 - 5.6.31, 5.6.39, 7.0.1, 7.0.4 - 7.0.5, 7.0.16, 7.0.18 - 7.0.19, 7.0.29 - 7.0.31, 7.1.1, 7.1.7, 7.1.10, 7.1.21, 7.2.1 - 7.2.8, 7.2.15, 7.3.0

Process exited with code 137.
Output for 7.0.0, 7.0.2 - 7.0.3, 7.0.6 - 7.0.15, 7.0.17, 7.0.20 - 7.0.28, 7.0.32 - 7.0.33, 7.1.0, 7.1.2 - 7.1.6, 7.1.8 - 7.1.9, 7.1.11 - 7.1.20, 7.1.22 - 7.1.33
Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /in/5EKgb on line 2 Notice: Use of undefined constant MCRYPT_MODE_CBC - assumed 'MCRYPT_MODE_CBC' in /in/5EKgb on line 4 Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/5EKgb:7 Stack trace: #0 {main} thrown in /in/5EKgb on line 7
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.35, 5.5.37 - 5.5.38, 5.6.1 - 5.6.5, 5.6.7 - 5.6.8, 5.6.10 - 5.6.12, 5.6.15, 5.6.19 - 5.6.26, 5.6.28, 5.6.32 - 5.6.38, 5.6.40
Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /in/5EKgb on line 2 Notice: Use of undefined constant MCRYPT_MODE_CBC - assumed 'MCRYPT_MODE_CBC' in /in/5EKgb on line 4 Fatal error: Call to undefined function mcrypt_encrypt() in /in/5EKgb on line 7
Process exited with code 255.

preferences:
193.66 ms | 404 KiB | 262 Q