3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $username = "username"; $password = "password"; $companyID = "companyID"; function encodeAES($u, $p, $c){ $original = "$u,$p,$c"; $key = "myKey"; $IV = "00000000"; return rtrim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $original, MCRYPT_MODE_CBC, $IV)), "\0\3"); } print encodeAES($username, $password, $companyID);
Output for 7.0.6 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/NFXoG:11 Stack trace: #0 /in/NFXoG(14): encodeAES('username', 'password', 'companyID') #1 {main} thrown in /in/NFXoG on line 11
Process exited with code 255.
Output for 5.6.7 - 5.6.20, 7.0.0 - 7.0.5
Warning: mcrypt_encrypt(): Key of size 5 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/NFXoG on line 11
Output for 5.3.28 - 5.3.29, 5.4.20 - 5.4.35, 5.5.35, 5.6.21 - 5.6.28
Fatal error: Call to undefined function mcrypt_encrypt() in /in/NFXoG on line 11
Process exited with code 255.
Output for 5.4.36 - 5.5.34
Warning: mcrypt_encrypt(): The IV parameter must be as long as the blocksize in /in/NFXoG on line 11 uNm2WL8LceBxi+ccVeqaXFy4PYc+SU+WfAN1wZwj2b4=
Output for 5.0.0 - 5.3.27, 5.4.0 - 5.4.19
Fatal error: Call to undefined function mcrypt_encrypt() in /in/6NCqi on line 11
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: mcrypt_encrypt() in /in/6NCqi on line 11
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: mcrypt_encrypt() in /in/6NCqi on line 11
Process exited with code 255.
Output for 4.3.1
Fatal error: Call to undefined function: mcrypt_encrypt() in /in/6NCqi on line 11
Output for 4.3.0
Fatal error: Call to undefined function: mcrypt_encrypt() in /in/NFXoG on line 11