3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $expected_result = "MeO+OkLlLR7+3acBmx40mXUq9/2jyB7Bgk4HPCMMOZWm0Q8ImAaNNxmb5Ukjl6lS+nRyYOTYvi2KP3D+7PIKpQ=="; $key = "nkCrEY3Lek2GHVC9Yfg6LK00dWYat88L"; $savedUser = "test1user1"; $movieID = "asd90asd89f7d9"; $fileName = "myporn.mp4"; $message = "id=" . $movieID . "&username=" . $savedUser . "&filename=" . $fileName; $myVarIWantToEncodeAndDecode = $message; echo ($message); //http_build_query $iv = md5(md5($key)); $iv = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; $encoded = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, ($key), $myVarIWantToEncodeAndDecode, MCRYPT_MODE_CBC, $iv )); echo ("<br>\r\n".$encoded ."\r\n<br>"); echo ("<br>\r\n".$expected_result ."\r\n<br>");
based on bZLTk
Output for 7.0.6 - 7.2.0
id=asd90asd89f7d9&username=test1user1&filename=myporn.mp4 Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/Ie5pd:28 Stack trace: #0 {main} thrown in /in/Ie5pd on line 28
Process exited with code 255.
Output for 5.6.8 - 5.6.20, 7.0.0 - 7.0.5
id=asd90asd89f7d9&username=test1user1&filename=myporn.mp4 Warning: mcrypt_encrypt(): Received initialization vector of size 32, but size 16 is required for this encryption mode in /in/Ie5pd on line 28 <br> <br><br> MeO+OkLlLR7+3acBmx40mXUq9/2jyB7Bgk4HPCMMOZWm0Q8ImAaNNxmb5Ukjl6lS+nRyYOTYvi2KP3D+7PIKpQ== <br>
Output for 5.3.21 - 5.3.29, 5.5.35, 5.6.21 - 5.6.28
id=asd90asd89f7d9&username=test1user1&filename=myporn.mp4 Fatal error: Call to undefined function mcrypt_encrypt() in /in/Ie5pd on line 28
Process exited with code 255.
Output for 5.4.11 - 5.5.34
id=asd90asd89f7d9&username=test1user1&filename=myporn.mp4 Warning: mcrypt_encrypt(): The IV parameter must be as long as the blocksize in /in/Ie5pd on line 28 <br> MeO+OkLlLR7+3acBmx40mXUq9/2jyB7Bgk4HPCMMOZV3PnSZ81iC3j7Z9mw0Ij5OVQvknTmRJ4DuuFDMwbrbaA== <br><br> MeO+OkLlLR7+3acBmx40mXUq9/2jyB7Bgk4HPCMMOZWm0Q8ImAaNNxmb5Ukjl6lS+nRyYOTYvi2KP3D+7PIKpQ== <br>