Defining class methods in PHP

后端 未结 8 1286
臣服心动
臣服心动 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.

提交回复
热议问题