Em Sáb, 2008-03-22 às 17:19 -0500, Gregory Beaver escreveu:
> Felipe Pena wrote:
> > Em Sex, 2008-03-21 às 17:01 -0500, Gregory Beaver escreveu:
> >>> 1) namespace foo { }
> >> This is acceptable if nothing can exist outside namespace foo {} except
> >> declare and other namespace declarations.
> >>
> > 
> > Indeed!
> > 
> > Here's my try:
> > http://felipe.ath.cx/diff/namespace.diff
> > http://felipe.ath.cx/diff/namespace.phpt
> > 
> 
> Hi Felipe,
> 
> The patch is pristine coding, but I do think the error message needs
> some loving:
> 
> +             if (zend_do_namespace_check(TSRMLS_C) == FAILURE) {
> +                     zend_error(E_COMPILE_ERROR, "Only namespace declaration 
> is allowed
> in the script");
> 
> This implies that only "namespace" is allowed, and would be confusing to
> 99% of users.  Might I suggest this error message instead:
> 
> "This script contains namespaces, all other code must be contained
> within namespace declarations"

Nice. Patch updated! :)

-- 
Regards,
Felipe Pena.


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to