Re: RE: Trouble with zend_language_parser.y
| From: | Nikita Popov | Date: | Mon, 07 May 2012 19:26:31 +0000 |
| Subject: | Re: RE: Trouble with zend_language_parser.y | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60513@lists.php.net to get a copy of this message | ||
On Mon, May 7, 2012 at 9:16 PM, Clint Priest <cpriest@zerocue.com> wrote:
> Alright, I'm new to git but I believe I have a branch off my fork which demonstrates the
> issue.
>
> https://github.com/cpriest/php-src/tree/isset-unset-issue
>
> This branch also features just code necessary to produce the results, if you search in
> zend_compile.h for ISSUE-ISSET-LANGUAGE-PARSER you'll see further contextual notes on what
> I'm seeing that's the issue.
>
> It seems the function_token is getting the rest of the script stuffed into it.
When you write $1 (where 1 references a terminal) you are accessing
the zendlval of the token. Not all tokens define an lval. Only tokens
which have a meaningful value (like numbers, strings, etc). So when
accessing the value of T_ISSET you just get some junk (as it does not
set a value).
Not sure that's really right, but that would be my guess :)
Nikita