IsAssignable::checkList()
Not yet in a tagged release
Description
IsAssignable::checkList() - can every item in a list be used with PHP's object-assignment -> notation?
// as static function
use GanbaroDigital\MissingBits\TypeChecks\IsAssignable;
bool IsAssignable::checkList(mixed $list);
Parameters
IsAssignable::checkList() takes one parameter:
mixed $list- the list to inspect
Return Value
IsAssignable::checkList() returns a boolean:
trueif every entry in$listcan be used with PHP's object-assignment notationfalseotherwise
Throws
IsAssignable::checkList() throws an InvalidArgumentException if:
$listis not a valid list (seeIsList::check()for details)
Works With
IsAssignable::checkList() is supported on these versions of PHP:
| PHP Version | Works? |
|---|---|
| 5.5 | Yes |
| 5.6 | Yes |
| 7.0 | Yes |
| HHVM | Yes |