Source: www.amitmerchant.com

Proposed named arguments in PHP 8

Category: PHP, javascript

A blog on PHP, JavaScript and more Amit Merchant · July 10, 2020 · ⋆ PHP Did you ever get in a situation where you’re seeing a function and its parameters and wonders what those parameters are all about?

For instance, take following, Now, the first three parameters passed to array_slice is seemed to be self-explanatory because of informative variable names but what about the fourth parameter?

Well, this can be solved if this RFC is approved in PHP 8 which introduces named parameters.

You can refer to the original RFC (which is still in the voting phase) if you want to take a more in-depth look at named parameters and constraints they comes with.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners