Php doesn’t have direct functions for AES encryption and decryption like MySql.
These functions will do exactly what the MySql functions do.
Encypt function:

function AES_ENCRYPT($value, $secret)
{
return rtrim(
base64_encode(
mcrypt_encrypt(
[...]