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:
true
if every value in$list
is a valid PHP listfalse
otherwise
Throws
IsList::checkList()
throws an InvalidArgumentException
if:
$list
is 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 |