You're ignoring the case where people use "my\namespace" as a string
to pass into eg: the reflection API, call_user_function etc. etc.

--Wez.

On 12/4/05, Marcus Boerger <[EMAIL PROTECTED]> wrote:
> Hello Wez,
>
> Sunday, December 4, 2005, 7:45:14 PM, you wrote:
>
> > On 12/4/05, Marcus Boerger <[EMAIL PROTECTED]> wrote:
> >> >> Wrong assumption. The \ won't need to be escaped.
> >> > Err, what about "my\namespace" ?
> >>
> >> That would be the string "my" <newline> "namespace".
>
> > Exactly.
>
> >> As a classname it would be "class namespace in namespace my".
> >> I guess your point is how to use that in ""-$-expressions, right?
> >>   $bla = "${foo\bar::constant}";
>
> > Thus it does need to be escaped when used in double-quoted strings.
>
> No, it uses the same parser inside ${...} or $[a-zA-Z_][a-zA-Z_0-9...]+
> as it does for other stuff too. So no no escaping is needed.
>
> Best regards,
>  Marcus
>
>

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

Reply via email to