Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lordspace opened this issue Sep 1, 2024 · 1 comment

Comments

@lordspace
Copy link

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

@W0rma
Copy link
Contributor

W0rma commented Dec 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants