]> granicus.if.org Git - php/commitdiff
- Decrease precedence of instanceof so that the following is true:
authorAndi Gutmans <andi@php.net>
Mon, 23 Feb 2004 08:40:39 +0000 (08:40 +0000)
committerAndi Gutmans <andi@php.net>
Mon, 23 Feb 2004 08:40:39 +0000 (08:40 +0000)
php -r 'var_export((object)1 instanceof stdClass);';
Patch by Jan Lehnardt

Zend/zend_language_parser.y

index 3fdfb44fba6b0ac4c4977396967590aae1094d00..cb7a7bd7337c7f0032374137a014ed6bf78f4968 100644 (file)
 %left T_SL T_SR
 %left '+' '-' '.'
 %left '*' '/' '%'
+%nonassoc T_INSTANCEOF
 %right '!' '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
 %right '['
-%nonassoc T_NEW T_INSTANCEOF T_CLONE
+%nonassoc T_NEW T_CLONE
 %token T_EXIT
 %token T_IF
 %left T_ELSEIF