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); $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 = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, ($key), $myVarIWantToEncodeAndDecode, MCRYPT_MODE_CBC,$iv ); echo ("\r\nPHP Key:".$encoded ."\r\n<br>"); echo ("\r\n Expect: ".$expected_result ."\r\n<br>");
based on CKNkO
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/Kg8mR:17 Stack trace: #0 {main} thrown in /in/Kg8mR on line 17
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 PHP Key:#_�H�؎q,Qƚl�����>�����Y�-��PU�p*���T ��Џ���FE�H[Xr <br> Expect: 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/Kg8mR on line 17
Process exited with code 255.