Page 1 of 1

operator overloading

Posted: Sat Aug 29, 2009 1:02 am
by ranjitbd
hi,
can anyone give me a nice short document to read to understand operator overloading concept in OOP(object oriented programming)
with one or two example...

Re: operator overloading

Posted: Sat Aug 29, 2009 1:30 am
by requinix
PHP doesn't have operator overloading.

Re: operator overloading

Posted: Sat Aug 29, 2009 2:10 am
by Eran
there's SPL which provides some overloading for arrays - http://www.php.net/~helly/php/ext/spl/
And also the PECL extension Operator which provides more overloading capabilities but it's highly experimental - http://pecl.php.net/package/operator

Re: operator overloading

Posted: Sat Aug 29, 2009 6:58 am
by Darhazer
Read "The C++ progragramming language" by Bjarne Stroustrup and you'll get much better understanding of the OO concepts.

Re: operator overloading

Posted: Sat Aug 29, 2009 7:01 am
by Darhazer
pytrin wrote: And also the PECL extension Operator which provides more overloading capabilities but it's highly experimental - http://pecl.php.net/package/operator
Pretty interesting, I'll give it a try. Thank you.