public function verifyConnection(array $connectionHeader) {
        foreach ($connectionHeader as $l) {
            $upgrades = array_filter(
                array_map('trim', array_map('strtolower', explode(',', $l))),
                function ($x) {
                    return 'upgrade' === $x;
                }
            );
            if (count($upgrades) > 0) {
                return true;
            }
        }
        return false;
    }
public function verifyConnection(array $connectionHeader) {
        foreach ($connectionHeader as $l) {
            $upgrades = array_filter(
                array_map('trim', array_map('strtolower', explode(',', $l))),
                function ($x) {
                    return 'upgrade' === $x;
                }
            );
            if (count($upgrades) > 0) {
                return true;
            }
        }
        return false;
    }
public function verifyConnection ( array $ connectionHeader ) { foreach ( $ connectionHeader as $ l ) { $ upgrades = array_filter ( array_map ( 'trim' , array_map ( 'strtolower' , explode ( ',' , $ l ) ) ) , function ( $ x ) { return 'upgrade' === $ x ; } ) ; if ( count ( $ upgrades ) > 0 ) { return true ; } } return false ; }
Verify the Connection header
@param  array $connectionHeader MUST include "Upgrade"
@return bool
Verify the Connection header