| Posted by deciacco on 07/14/06 16:17 
I was wondering if there was a way to do operator overlaoding in phplike 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!!
  Navigation: [Reply to this message] |