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:

Return Value

IsAssignable::checkList() returns a boolean:

Throws

IsAssignable::checkList() throws an InvalidArgumentException if:

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