public function deleteByValue($value, bool $strict = true) : void
    {
        foreach($this->_data as $data) {
            $exists = ($strict) ? ($data === $value)
                                : ($data == $value);

            if($exists) {
                unset($this->_data[$value]);
            }
        }
    }
public function deleteByValue($value, bool $strict = true) : void
    {
        foreach($this->_data as $data) {
            $exists = ($strict) ? ($data === $value)
                                : ($data == $value);

            if($exists) {
                unset($this->_data[$value]);
            }
        }
    }
public function deleteByValue ( $ value , bool $ strict = true ) : void { foreach ( $ this -> _data as $ data ) { $ exists = ( $ strict ) ? ( $ data === $ value ) : ( $ data == $ value ) ; if ( $ exists ) { unset ( $ this -> _data [ $ value ] ) ; } } }
Deletes an index in the array by its value.

@param mixed $value  Index value.
@param bool  $strict Flag indicating that the value must be exactly the same or not (default = `true`).
Deletes an index in the array by its value .