public function remove($element): bool
    {
        if (($position = \array_search($element, $this->data, true)) !== false) {
            unset($this->data[$position]);

            return true;
        }

        return false;
    }
public function remove($element): bool
    {
        if (($position = \array_search($element, $this->data, true)) !== false) {
            unset($this->data[$position]);

            return true;
        }

        return false;
    }
public function remove ( $ element ) : bool { if ( ( $ position = \ array_search ( $ element , $ this -> data , true ) ) !== false ) { unset ( $ this -> data [ $ position ] ) ; return true ; } return false ; }
Removes a single instance of the specified element from this collection,
if it is present.

@param mixed $element The element to remove from the collection.

@return bool `true` if an element was removed as a result of this call.
Removes a single instance of the specified element from this collection if it is present .