private function isTCoalesceEqual($tokens, $stackPtr)
    {
        if ($tokens[$stackPtr]['code'] !== \T_EQUAL || isset($tokens[($stackPtr - 1)]) === false) {
            // Function called for wrong token or token has no predecesor.
            return false;
        }

        if ($tokens[($stackPtr - 1)]['type'] === 'T_COALESCE') {
            return true;
        }
        if ($tokens[($stackPtr - 1)]['type'] === 'T_INLINE_THEN'
            && (isset($tokens[($stackPtr - 2)]) && $tokens[($stackPtr - 2)]['type'] === 'T_INLINE_THEN')
        ) {
            return true;
        }

        return false;
    }
private function isTCoalesceEqual($tokens, $stackPtr)
    {
        if ($tokens[$stackPtr]['code'] !== \T_EQUAL || isset($tokens[($stackPtr - 1)]) === false) {
            // Function called for wrong token or token has no predecesor.
            return false;
        }

        if ($tokens[($stackPtr - 1)]['type'] === 'T_COALESCE') {
            return true;
        }
        if ($tokens[($stackPtr - 1)]['type'] === 'T_INLINE_THEN'
            && (isset($tokens[($stackPtr - 2)]) && $tokens[($stackPtr - 2)]['type'] === 'T_INLINE_THEN')
        ) {
            return true;
        }

        return false;
    }
private function isTCoalesceEqual ( $ tokens , $ stackPtr ) { if ( $ tokens [ $ stackPtr ] [ 'code' ] !== \ T_EQUAL || isset ( $ tokens [ ( $ stackPtr - 1 ) ] ) === false ) { // Function called for wrong token or token has no predecesor. return false ; } if ( $ tokens [ ( $ stackPtr - 1 ) ] [ 'type' ] === 'T_COALESCE' ) { return true ; } if ( $ tokens [ ( $ stackPtr - 1 ) ] [ 'type' ] === 'T_INLINE_THEN' && ( isset ( $ tokens [ ( $ stackPtr - 2 ) ] ) && $ tokens [ ( $ stackPtr - 2 ) ] [ 'type' ] === 'T_INLINE_THEN' ) ) { return true ; } return false ; }
Callback function to determine whether a T_EQUAL token is really a T_COALESCE_EQUAL token.

@param array $tokens   The token stack.
@param int   $stackPtr The current position in the token stack.

@return bool
Callback function to determine whether a T_EQUAL token is really a T_COALESCE_EQUAL token .