Re: [PHP-DEV] wacky object idea From: Chuck Hagenbuch (chuck <email protected>)
Date: 08/28/00

Quoting Andi Gutmans <andi <email protected>>:

> I think this would cause lots of confusion. PHP types aren't always that
> obvious and you'll probably get lots of unexpected results. Not sure things
> will work as consistently as you guys expect.

Can you elaborate on this at all?

My idea is that if you specifically define a function inside your class
(following current convention, it'd be __boolean_value), then whenever you
needed to evaluate that object in a boolean context, you'd use the result of
that function. Seems like it shouldn't confuse people, since it would only
change current behavior if you actually went ahead and changed your code to
define __boolean_value...

-chuck

--
Charles Hagenbuch, <chuck <email protected>>
--
...and remember: elmo is _not_ an insertion toy.

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>