Re: instanceof has higher precedence than casts
| From: | Andi Gutmans | Date: | Tue, 17 Feb 2004 07:55:13 +0000 |
| Subject: | Re: instanceof has higher precedence than casts | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7900@lists.php.net to get a copy of this message | ||
I'll take a look at it. The patch seems to be OK.
Thanks,
Andi
At 03:59 PM 2/16/2004 +0100, Jan Lehnardt wrote:
Hi, some dude on IRC found out that php -r 'var_export((object)1 instanceof stdClass);'; results in class stdClass { public $scalar = false; } IMHO it should just return true. The ZEND_ENGINE file doesn't state anything about the precedence of instanceof. The fix is pretty simple and a patch to zend_language_parser.y is attached. make test runs through fine, so I guess it doesn't brake anything else, but I can't tell for sure of course. It would be great if someone could look into this. Best regards, Jan -- GPG Key: BB96 56B0 Q: Thank Jan? - A: http://geschenke.an.dasmoped.net/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php