3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getExpectedCiphertextSize(int $sizeOfInput) : int { $padding = ($sizeOfInput % 16); if ($padding === 0) { // PKCS7 $padding += 16; } return 16 // IV + 32 // HMAC-SHA-256 + $sizeOfInput + $padding; } var_dump(getExpectedCiphertextSize(100));

preferences:
53.03 ms | 402 KiB | 5 Q