3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cipher = openssl_encrypt( 'Yes, it totally does.', 'aes-128-ctr', hash('sha256', 'spottycats', true), OPENSSL_RAW_DATA, str_repeat("\x00", 16) ); $hmac = hash_hmac( 'sha256', $cipher, hash('sha256', 'spottycats', true), true ); echo base64_encode($cipher . $hmac), PHP_EOL;

preferences:
48.61 ms | 402 KiB | 5 Q