private function _last(callable $callback = null)
    {
        $values = $this->getValues();
        if ($callback){
            foreach(array_reverse($values) as $key => $value){
                if ($callback($value, $key)){
                    return $value;
                }
            }
        }
        else{
            return empty($values) ? null : $values[count($values)-1];
        }
        return null;
    }
private function _last(callable $callback = null)
    {
        $values = $this->getValues();
        if ($callback){
            foreach(array_reverse($values) as $key => $value){
                if ($callback($value, $key)){
                    return $value;
                }
            }
        }
        else{
            return empty($values) ? null : $values[count($values)-1];
        }
        return null;
    }
private function _last ( callable $ callback = null ) { $ values = $ this -> getValues ( ) ; if ( $ callback ) { foreach ( array_reverse ( $ values ) as $ key => $ value ) { if ( $ callback ( $ value , $ key ) ) { return $ value ; } } } else { return empty ( $ values ) ? null : $ values [ count ( $ values ) - 1 ] ; } return null ; }
Get tail element of the array

@param callable $callback

@return mixed
Get tail element of the array