Operator Overloading
- From: "deciacco" <eugenio@xxxxxxxxxx>
- Date: 14 Jul 2006 09:17:05 -0700
I was wondering if there was a way to do operator overlaoding in php
like you can in c++.
In c++ you can do something like:
cout << myobject; -- and have myobject handle the output.
Is there a way to...
echo myobject; -- and be able to have a custom definded method in
myobject do some kind of output?
Any other suggestions?
( I was thinking of having a custom method called echo in myobject so
one could do echo myobject->echo(); This is not as clean....)
Thanks!!
.
- Follow-Ups:
- Re: Operator Overloading
- From: ~john
- Re: Operator Overloading
- From: Richard Levasseur
- Re: Operator Overloading
- Prev by Date: "call to undefined function" mysql_error when adding new rows to table
- Next by Date: Re: Which group for SQL builder?
- Previous by thread: "call to undefined function" mysql_error when adding new rows to table
- Next by thread: Re: Operator Overloading
- Index(es):