IsList::checkList()
Since v1.9.0
Description
IsList::checkList() - is every item in the list a valid PHP list?
use GanbaroDigital\MissingBits\TypeChecks\IsList;
bool IsList::checkList(mixed $list);
Parameters
IsList::checkList() takes one parameter:
mixed $list- the value to inspect
Return Value
IsList::checkList() returns a boolean:
trueif every value in$listis a valid PHP listfalseotherwise
Throws
IsList::checkList() throws an InvalidArgumentException if:
$listis not a valid list (seeIsList::check()for details)
Works With
IsList::checkList() is supported on these versions of PHP:
| PHP Version | Works? |
|---|---|
| 5.5 | Yes |
| 5.6 | Yes |
| 7.0 | Yes |
| HHVM | Yes |