public function isFreed(): bool
    {
        // If we are no longer connected to the memory segment, check if it has
        // been invalidated.
        if ($this->handle !== null) {
            $this->handleMovedMemory();
            $header = $this->getHeader();
            return $header['state'] === static::STATE_FREED;
        }

        return true;
    }
public function isFreed(): bool
    {
        // If we are no longer connected to the memory segment, check if it has
        // been invalidated.
        if ($this->handle !== null) {
            $this->handleMovedMemory();
            $header = $this->getHeader();
            return $header['state'] === static::STATE_FREED;
        }

        return true;
    }
public function isFreed ( ) : bool { // If we are no longer connected to the memory segment, check if it has // been invalidated. if ( $ this -> handle !== null ) { $ this -> handleMovedMemory ( ) ; $ header = $ this -> getHeader ( ) ; return $ header [ 'state' ] === static :: STATE_FREED ; } return true ; }
Checks if the object has been freed.

Note that this does not check if the object has been destroyed; it only
checks if this handle has freed its reference to the object.

@return bool True if the object is freed, otherwise false.
Checks if the object has been freed .