function indexOf($value) {
        $i = 0;
        
        foreach($this->data as $val) {
            if($val === $value) {
                return $i;
            }
            
            $i++;
        }
        
        return null;
    }
function indexOf($value) {
        $i = 0;
        
        foreach($this->data as $val) {
            if($val === $value) {
                return $i;
            }
            
            $i++;
        }
        
        return null;
    }
function indexOf ( $ value ) { $ i = 0 ; foreach ( $ this -> data as $ val ) { if ( $ val === $ value ) { return $ i ; } $ i ++ ; } return null ; }
Returns the position of the given value in the collection. Returns null if the given value couldn't be found.
@param mixed  $value
@return int|null
Returns the position of the given value in the collection . Returns null if the given value couldn t be found .