Overloading comparison operators in php

Is it possible to overload the == /! = Operators in php, similar to how it is done in .NET?

+5
source share
3 answers

No, unfortunately, you cannot. You must create a class or member function.

Edit: oh, didn't know about this PECL package! I have to try. :)

+1
source

( ), nikic Comparable, - https://github.com/nikic/comparable

+1

All Articles