3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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;
based on 2q2MY
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/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.6 - 7.1.10
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.6.7 - 5.6.20, 7.0.0 - 7.0.5
Notice: Undefined variable: enc in /in/cMBgI on line 5 Warning: mcrypt_get_iv_size(): Module initialization failed in /in/cMBgI on line 5 Warning: mcrypt_create_iv(): Cannot create an IV with a size of less than 1 or greater than 2147483647 in /in/cMBgI on line 5 Warning: mcrypt_encrypt(): Key of size 9 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/cMBgI on line 7
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/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.
Output for 5.4.1 - 5.5.34
Notice: Undefined variable: enc in /in/cMBgI on line 5 Warning: mcrypt_get_iv_size(): Module initialization failed in /in/cMBgI on line 5 Warning: mcrypt_create_iv(): Cannot create an IV with a size of less than 1 or greater than 2147483647 in /in/cMBgI on line 5 I�V��+Wч�#:��