1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/the-spread-syntax-understands-named-parameters-and-correctly-assigns-array-values-to-them.md
2022-04-17 20:03:34 +02:00

11 lines
No EOL
623 B
Markdown

---
title: 'The spread syntax understands named parameters and correctly assigns array values to them'
tweet_id: '1515057384204382208'
thread_slug: weekly-thread-2022-15
author_username: SteveTheBauman
images:
- 'https://pbs.twimg.com/media/FQJ4FUcX0A01ZUZ.jpg'
created_at: 2022-04-15T20:00:03+00:00
slug: the-spread-syntax-understands-named-parameters-and-correctly-assigns-array-values-to-them
---
Today I learned that PHP will insert callback parameters in the order of their defined name, when spreading an array of args with string keys, allowing you to place them in any position in the callback. Super cool! 💪