I have a line like this in my code:
list($user_id, $name, $limit, $remaining, $reset) = explode('|', $user);
The last 3 parameters may or may not be there. Is there a function similar to list that will automatically ignore those last parameters if the array is smaller than expected?
If any of the trailing optional substrings are missing in the input string, the corresponding variables should be assigned a null
value.
list
isn't a function. – Implicate