- Tidy:
. Fixed bug #77594 (ob_tidyhandler is never reset). (cmb)
+- Tokenizer:
+ . Fixed bug #80462 (Nullsafe operator tokenize with TOKEN_PARSE flag fails).
+ (Nikita)
+
- XML:
. XmlParser opaque object renamed to XMLParser for consistency with other XML objects. (girgias)
<ST_IN_SCRIPTING>"?->" {
yy_push_state(ST_LOOKING_FOR_PROPERTY);
- return T_NULLSAFE_OBJECT_OPERATOR;
+ RETURN_TOKEN(T_NULLSAFE_OBJECT_OPERATOR);
}
<ST_IN_SCRIPTING,ST_LOOKING_FOR_PROPERTY>{WHITESPACE}+ {
--- /dev/null
+--TEST--
+Bug #80462: Nullsafe operator tokenize with TOKEN_PARSE flag fails
+--FILE--
+<?php
+
+foreach (PhpToken::tokenize('<?php $foo = $a?->b();', TOKEN_PARSE) as $token) {
+ echo $token->getTokenName(), "\n";
+}
+
+?>
+--EXPECT--
+T_OPEN_TAG
+T_VARIABLE
+T_WHITESPACE
+=
+T_WHITESPACE
+T_VARIABLE
+T_NULLSAFE_OBJECT_OPERATOR
+T_STRING
+(
+)
+;