3v4l.org

run code in 300+ PHP versions simultaneously
<?php $encrypt = MCRYPT_RIJNDAEL_128; $key = 'something'; $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.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Fatal error: Uncaught Error: Undefined constant "MCRYPT_RIJNDAEL_128" in /in/cMBgI:2 Stack trace: #0 {main} thrown in /in/cMBgI on line 2
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
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/cMBgI 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/cMBgI on line 4 Fatal error: Uncaught Error: Call to undefined function mcrypt_create_iv() in /in/cMBgI:5 Stack trace: #0 {main} thrown in /in/cMBgI on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33
Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /in/cMBgI on line 2 Notice: Use of undefined constant MCRYPT_MODE_CBC - assumed 'MCRYPT_MODE_CBC' in /in/cMBgI on line 4 Fatal error: Uncaught Error: Call to undefined function mcrypt_create_iv() in /in/cMBgI:5 Stack trace: #0 {main} thrown in /in/cMBgI on line 5
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Notice: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /in/cMBgI on line 2 Notice: Use of undefined constant MCRYPT_MODE_CBC - assumed 'MCRYPT_MODE_CBC' in /in/cMBgI on line 4 Fatal error: Call to undefined function mcrypt_create_iv() in /in/cMBgI on line 5
Process exited with code 255.

preferences:
271.85 ms | 402 KiB | 378 Q