html2pdf
html2pdf copied to clipboard
idea/suggestion: having an array as input parameter for functions that accept more than 2 arguments is better
Hi, I find it very useful to use an array as an input parameter instead of 5-6 sequentially positioned parameters. that way you can only pass the required parameters and use default values for the rest.
https://github.com/spipu/html2pdf/blob/master/src/Html2Pdf.php#L178
that way you can only pass the required parameters and use default values for the rest.
With named arguments introduced in PHP 8.0 this should no longer be an issue.