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_256, ($key), $myVarIWantToEncodeAndDecode, MCRYPT_MODE_CBC, $iv )); echo ("<br>".$encoded ."<br>"); echo ("<br>".$expected_result ."<br>");
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/9l9un:28 Stack trace: #0 {main} thrown in /in/9l9un on line 28
Process exited with code 255.
Output for 5.4.11 - 5.5.34, 5.6.8 - 5.6.20, 7.0.0 - 7.0.5
id=asd90asd89f7d9&username=test1user1&filename=myporn.mp4<br>I1/AEUgDr9iOcSxRDsaabKGnBNsBrso+n+z3gasZ8cYRWest7cZQVeZwKqW86FQgq8/20I+qudx/RkXCSFtYcg==<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/9l9un on line 28
Process exited with code 255.