Skip to content
Advertisement

Tag: iterable-unpacking

unpacking an array of arguments in php

Python provides the “*” operator for unpacking a list of tuples and giving them to a function as arguments, like so: This is equivalent to: Does anyone know if there is a way to achieve this in PHP? Some googling for variations of “PHP Unpack” hasn’t immediately turned up anything.. perhaps it’s called something different in PHP? Answer You can

Advertisement