Does php support operator overloading?
I'm trying to create a class that takes in a date and I'd like to compare it with another object without having to use methods or properties.
This is what I'm trying to do:
$obj1 = new myClass('2016-08-15');
$obj2 = new myClass('2016-02-06');
if ($obj1 > $obj2){
...
}
I know how to do the date comparison, all I need to know is how to overload the operators >, < and ==.
Thanks.