3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $output = '1234 5678 9012 3456'; echo $output; $mcrypt_iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC); $mcrypt_iv = mcrypt_create_iv($mcrypt_iv_size, MCRYPT_RAND); $output = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $passkey, $output, MCRYPT_MODE_CBC, $mcrypt_iv); $output = base64_encode($output); echo $output; $output = base64_decode($output); $output = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $passkey, $output, MCRYPT_MODE_CBC, $mcrypt_iv); echo $output; ?>
Output for 7.0.30 - 7.3.0beta1
1234 5678 9012 3456 Fatal error: Uncaught Error: Call to undefined function mcrypt_get_iv_size() in /in/4GY0P:5 Stack trace: #0 {main} thrown in /in/4GY0P on line 5
Process exited with code 255.
Output for hhvm-3.22.0
1234 5678 9012 3456 Notice: Undefined variable: passkey in /in/4GY0P on line -1 Cz9KEbJdzmJxCvt2gc/8FX/L+2+NNGkyC6j1YScij/c= Notice: Undefined variable: passkey in /in/4GY0P on line -1 1234 5678 9012 3456
Output for hhvm-3.21.3
1234 5678 9012 3456 Notice: Undefined variable: passkey in /in/4GY0P on line 8 QSUV6fK9CiMBVvk7yLTR0YA2qv5nr0K6ub5Qy1bnjxM= Notice: Undefined variable: passkey in /in/4GY0P on line 13 1234 5678 9012 3456
Output for hhvm-3.18.5
1234 5678 9012 3456 Notice: Undefined variable: passkey in /in/4GY0P on line 8 Warning: mcrypt_encrypt() expects parameter 2 to be string, null given in /in/4GY0P on line 8 Warning: base64_encode() expects parameter 1 to be string, null given in /in/4GY0P on line 9 Warning: base64_decode() expects parameter 1 to be string, null given in /in/4GY0P on line 12 Notice: Undefined variable: passkey in /in/4GY0P on line 13 Warning: mcrypt_decrypt() expects parameter 2 to be string, null given in /in/4GY0P on line 13
Output for 5.6.30
1234 5678 9012 3456 Fatal error: Call to undefined function mcrypt_get_iv_size() in /in/4GY0P on line 5
Process exited with code 255.