You can create a self-documented, named argument workaround in PHP 5.6-7 with ... operator:
<?php
htmlspecialchars($string, ...array_values([
'flags' => ENT_COMPAT | ENT_HTML401,
'encoding' => 'UTF-8',
'double_encode' => false,
]))
?>