html2pdf icon indicating copy to clipboard operation
html2pdf copied to clipboard

idea/suggestion: having an array as input parameter for functions that accept more than 2 arguments is better

Open lordspace opened this issue 1 year ago • 1 comments

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

lordspace avatar Sep 01 '24 07:09 lordspace

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.

W0rma avatar Dec 03 '24 14:12 W0rma