If you're refering to 128-bit encryption, you can use native functions:
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
# creates a cipher text compatible with AES (Rijndael block size = 128)
# to keep the text confidential
# only suitable for encoded input that never ends with value 00h
# (because of default zero padding)
$ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_CBC, $iv);
# prepend the IV for it to be available for decryption
$ciphertext = $iv . $ciphertext;
# encode the resulting cipher text so it can be represented by a string
echo base64_encode($ciphertext);
https://php.net/manual/en/function.mcrypt-encrypt.php
With Phalcon\Crypt:
<?php
//Create an instance
$crypt = new Phalcon\Crypt();
$key = 'le password';
$text = 'This is a secret text';
$crypt->setMode(MCRYPT_MODE_CBC);
$crypt->setCipher(MCRYPT_RIJNDAEL_128);
$encrypted = $crypt->encrypt($text, $key);
https://docs.phalcon.io/en/latest/reference/crypt.html#basic-usage