HH\Vector::isEmpty

Description

public function isEmpty(): bool

Checks if the current Vector is empty.

Return Values

  • bool - true if the current Vector is empty; false otherwise.

Examples

<?hh

namespace Hack\UserDocumentation\API\Examples\Vector\IsEmpty;

$v = Vector {};
var_dump($v->isEmpty());

$v = Vector {'red', 'green', 'blue', 'yellow'};
var_dump($v->isEmpty());
Output
bool(true)
bool(false)