private function couldBeBinaryInteger($tokens, $stackPtr)
    {
        $token = $tokens[$stackPtr];

        if ($token['code'] !== \T_LNUMBER) {
            return false;
        }

        if ($this->isLowPHPVersion === false) {
            return (preg_match('`^0b[0-1]+$`D', $token['content']) === 1);
        }
        // Pre-5.4, binary strings are tokenized as T_LNUMBER (0) + T_STRING ("b01010101").
        // At this point, we don't yet care whether it's a valid binary int, that's a separate check.
        else {
            return($token['content'] === '0' && $tokens[$stackPtr + 1]['code'] === \T_STRING && preg_match('`^b[0-9]+$`D', $tokens[$stackPtr + 1]['content']) === 1);
        }
    }
private function couldBeBinaryInteger($tokens, $stackPtr)
    {
        $token = $tokens[$stackPtr];

        if ($token['code'] !== \T_LNUMBER) {
            return false;
        }

        if ($this->isLowPHPVersion === false) {
            return (preg_match('`^0b[0-1]+$`D', $token['content']) === 1);
        }
        // Pre-5.4, binary strings are tokenized as T_LNUMBER (0) + T_STRING ("b01010101").
        // At this point, we don't yet care whether it's a valid binary int, that's a separate check.
        else {
            return($token['content'] === '0' && $tokens[$stackPtr + 1]['code'] === \T_STRING && preg_match('`^b[0-9]+$`D', $tokens[$stackPtr + 1]['content']) === 1);
        }
    }
private function couldBeBinaryInteger ( $ tokens , $ stackPtr ) { $ token = $ tokens [ $ stackPtr ] ; if ( $ token [ 'code' ] !== \ T_LNUMBER ) { return false ; } if ( $ this -> isLowPHPVersion === false ) { return ( preg_match ( '`^0b[0-1]+$`D' , $ token [ 'content' ] ) === 1 ) ; } // Pre-5.4, binary strings are tokenized as T_LNUMBER (0) + T_STRING ("b01010101"). // At this point, we don't yet care whether it's a valid binary int, that's a separate check. else { return ( $ token [ 'content' ] === '0' && $ tokens [ $ stackPtr + 1 ] [ 'code' ] === \ T_STRING && preg_match ( '`^b[0-9]+$`D' , $ tokens [ $ stackPtr + 1 ] [ 'content' ] ) === 1 ) ; } }
Could the current token an potentially be a binary integer ?

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

@return bool
Could the current token an potentially be a binary integer ?