Does php support operator overloading?

后端 未结 2 1191
伪装坚强ぢ
伪装坚强ぢ 2021-01-26 05:55

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 o

2条回答
  •  孤街浪徒
    2021-01-26 06:42

    PHP's interpretation of "overloading" is different than most object oriented languages. Overloading traditionally provides the ability to have multiple methods with the same name but different quantities and types of arguments.

    I hope this link will help you to understand concept,

    http://php.net/manual/en/language.oop5.overloading.php

提交回复
热议问题