#PHP foreach() works on arrays and objects. On objects, it skips uninitialized properties, which may be very convenient with readonly properties : otherwise, it is a fatal error!
Thursday, April 11th is @010php day, hosted by @bitfactory.
This month's session is about #PHP advanced type usage. See the impact of types on the structure of your code, identify impossible methods and design the others!
A #PHP variadic argument collects all the unused named parameters, along with their key. That way, it is possible to handle them with their name inside the method.
On the other hand, array_merge (and some cousins) refuse them, and emits a Fatal error.
Compact() and extract() are two sides of the same coin. They are also a good part of the PHP story, along with the variable variables. Let’s see how they can make it into the future of PHP.