Hello,

On 8/10/06, Derick Rethans <[EMAIL PROTECTED]> wrote:
On Thu, 10 Aug 2006, Pierre wrote:

> On 8/10/06, Michael Walter <[EMAIL PROTECTED]> wrote:
> > Yeah. It is problematic that the application has no chance of dealing
> > with the errors itself (consider e.g. php-shell which has to go great
> > lengths to prevent fatal errors from user code leading to php-shell's
> > termination, and still fails at doing this in the general case).
>
> Why object should act differently than other php variables or
> constants? Undefined constant, variable, index or offset do not raise
> a fatal error. It should be the same for the object (constants, props,
> visibility,...).

He wasn't talking about *undefined variables* at all. The variable *is*
defined as private and calling that is ofcourse not allowed.

I was adding more info to the request. As this problem is not only
about this case.

For example, try:

php -r 'class foo{const bar=2;} echo foo::bar; echo foo::bar2;'

In my opinion, echo foo::bar2; should not be a fatal error, just like
"echo BAR2;".

--Pierre

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

Reply via email to