3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "secret"; $key = hash('sha512', 'The insecure key', 1); echo base64_encode(mcrypt_encrypt('MCRYPT_RIJNDAEL_256', $key, $string, MCRYPT_MODE_CBC));

preferences:
38.31 ms | 402 KiB | 5 Q