3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = 'this is my test string'; $key = '1234'; $mcryptEnc = base64_encode(mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $data, MCRYPT_MODE_ECB)); $data = $data . str_repeat(chr(0), 8 - (strlen($data) % 8)); $opensslEnc = base64_encode(openssl_encrypt($data, 'bf-ecb', paddKey($key), OPENSSL_ZERO_PADDING| OPENSSL_RAW_DATA)); echo "Mcrypt encoded = $mcryptEnc \n"; echo "OpenSSL encoded = $opensslEnc \n";
Output for 7.0.6 - 7.3.0beta1
Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/9FMmD:6 Stack trace: #0 {main} thrown in /in/9FMmD on line 6
Process exited with code 255.
Output for 7.0.0 - 7.0.5
Fatal error: Uncaught Error: Call to undefined function paddKey() in /in/9FMmD:8 Stack trace: #0 {main} thrown in /in/9FMmD on line 8
Process exited with code 255.
Output for 5.5.35 - 5.5.36, 5.6.21 - 5.6.22
Fatal error: Call to undefined function mcrypt_encrypt() in /in/9FMmD on line 6
Process exited with code 255.
Output for 5.5.0 - 5.5.34, 5.6.0 - 5.6.20
Fatal error: Call to undefined function paddKey() in /in/9FMmD on line 8
Process exited with code 255.