Defining class methods in PHP

后端 未结 8 1285
臣服心动
臣服心动 2021-01-05 10:55

Is it possible in PHP (as it is in C++) to declare a class method OUTSIDE the class definition?

相关标签:
8条回答
  • 2021-01-05 11:23

    No it is not posible. if you define function/method outside class construct it becomes global function.

    0 讨论(0)
  • 2021-01-05 11:24

    No.

    You can extend previously declared classes, though, if that helps.

    0 讨论(0)
提交回复
热议问题