I am in doubt what to use:
foreach(){
    // .....
    if(!in_array($view, $this->_views[$condition]))
        array_push($this->_views[$condition], $view);
    // ....
}
OR
foreach(){
    // .....
    array_push($this->_views[$condition], $view);
    // ....
}
$this->_views[$condition] = array_unique($this->_views[$condition]);
UPDATE
The goal is to get array of unique values. This can be done by checking every time if value already exists with in_array or add all values each time and in the end use array_unique. So is there any major difference between this two ways?
 
     
     
     
    

