Re: svn: /php/php-src/ branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/zend_compile.c
| From: | Hannes Magnusson | Date: | Tue, 16 Aug 2011 11:44:31 +0000 |
| Subject: | Re: svn: /php/php-src/ branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/zend_compile.c | ||
| References: | 1 2 3 4 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-65865@lists.php.net to get a copy of this message | ||
On Tue, Aug 16, 2011 at 13:39, Stefan Marr <php@stefan-marr.de> wrote:
>
> On 16 Aug 2011, at 13:23, Hannes Magnusson wrote:
>
>> On Tue, Aug 16, 2011 at 13:05, Stefan Marr <php@stefan-marr.de> wrote:
>>> Hi Hannes:
>>>
>>> On 16 Aug 2011, at 12:46, Hannes Magnusson wrote:
>>>
>>>> + if (!strcmp(Z_STRVAL_P(name), "strict")) {
>>>> + zend_error(E_COMPILE_ERROR, "You seem to be
>>>> trying to use a different language...");
>>>> + }
>>> Could we change that error to be a bit more explicit about what is not expected?
>>
>> I'm unsure what you are asking...
>
> Sorry, I don't know anything about the context of that change, but I don't see how
> anyone but you knows what
> 'zend_error(E_COMPILE_ERROR, "You seem to be trying to use a different
> language...");' means when it pops up in an error output.
>
> The goal of an error message should be to help to identify the cause for it, and even better to
> help to avoid it in the future, right?
"use foobar;" has no effect, at all, and you will get an warning
message telling you that.
If you however mix Perl with PHP and attempt to do "use strict;"
you'll get a nice little errormessage easter egg alerting you of your
mistakes.
-Hannes