WeakRef::valid

( excerpt from http://php.net/manual/en/weakref.valid.php )

public function valid(): bool;

Checks whether the object referenced still exists.

Returns

  • bool