- var_dump: documentation ( source)
<?php
$textToEncrypt = "hello";
$encryptionMethod = "aes-256-cbc";
$secretHash = "123455";
$iv = "123456789012";
$encryptedMessage = openssl_encrypt($textToEncrypt, $encryptionMethod, $secretHash, 0, $iv);
var_dump($encryptedMessage);
$decryptedMessage = openssl_decrypt($encryptedMessage, $encryptionMethod, $secretHash, 0, $iv);
echo $decryptedMessage;