protected function extractForFromForwardedHeader($forwarded)
    {
        $ips = [];
        $parts = array_map('trim', explode(',', $forwarded));
        
        foreach ($parts as $part) {
            list($key, $value) = explode('=', $part, 2) + [1 => null];
            
            if ($key === 'for') {
                $ips[] = trim($value, '[]');
            }
        }
        
        return $ips;
    }
protected function extractForFromForwardedHeader($forwarded)
    {
        $ips = [];
        $parts = array_map('trim', explode(',', $forwarded));
        
        foreach ($parts as $part) {
            list($key, $value) = explode('=', $part, 2) + [1 => null];
            
            if ($key === 'for') {
                $ips[] = trim($value, '[]');
            }
        }
        
        return $ips;
    }
protected function extractForFromForwardedHeader ( $ forwarded ) { $ ips = [ ] ; $ parts = array_map ( 'trim' , explode ( ',' , $ forwarded ) ) ; foreach ( $ parts as $ part ) { list ( $ key , $ value ) = explode ( '=' , $ part , 2 ) + [ 1 => null ] ; if ( $ key === 'for' ) { $ ips [ ] = trim ( $ value , '[]' ) ; } } return $ ips ; }
Extract the `for` part from the Forwarded header

@param string $forwarded
@return string
Extract the for part from the Forwarded header