3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $value = 1371320016; var_dump($value); srand($value); $key = rand(); var_dump($key); $cyphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_CBC);
Output for 7.1.0
int(1371320016) int(744069174) Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/54KnT:7 Stack trace: #0 {main} thrown in /in/54KnT on line 7
Process exited with code 255.
Output for 7.0.6 - 7.0.14
int(1371320016) int(1659983877) Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/54KnT:7 Stack trace: #0 {main} thrown in /in/54KnT on line 7
Process exited with code 255.
Output for 5.6.0 - 5.6.20, 7.0.0 - 7.0.5
int(1371320016) int(1659983877) Notice: Undefined variable: data in /in/54KnT on line 7 Warning: mcrypt_encrypt(): Key of size 10 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/54KnT on line 7
Output for hhvm-3.10.0 - 3.12.0
int(1371320016) int(1659983877) Notice: Undefined variable: data in /in/54KnT on line 7 Warning: mcrypt_encrypt(): The IV parameter must be as long as the blocksize in /in/54KnT on line 7
Output for 5.0.0 - 5.3.29, 5.5.35 - 5.5.36, 5.6.21 - 5.6.28
int(1371320016) int(1659983877) Fatal error: Call to undefined function mcrypt_encrypt() in /in/54KnT on line 7
Process exited with code 255.
Output for 5.4.0 - 5.5.34
int(1371320016) int(1659983877) Notice: Undefined variable: data in /in/54KnT on line 7 Warning: mcrypt_encrypt(): Attempt to use an empty IV, which is NOT recommend in /in/54KnT on line 7
Output for 4.4.5 - 4.4.9
int(1371320016) int(1659983877) Fatal error: Call to undefined function: mcrypt_encrypt() in /in/54KnT on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
int(1371320016) int(1659983877) Fatal error: Call to undefined function: mcrypt_encrypt() in /in/54KnT on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
int(1371320016) int(1659983877) Fatal error: Call to undefined function: mcrypt_encrypt() in /in/54KnT on line 7