Is there a way to program 100% object-oriented in PHP?

前端 未结 2 1888
灰色年华
灰色年华 2021-01-23 08:02

I guess, it\'s possible to call functions in a separate class, I call this object-oriented programming in PHP.

But at the beginning, there is always an index.php or some

2条回答
  •  再見小時候
    2021-01-23 08:41

    Not by default. But you could write your own bootstrap that does this, see a related answer that outlines how you can do it.

    If index.php is your only central entry point, it's already the bootstrap.

    From that point on, you can do everything OOP you like. However, I think your question is less about OOP but more about how you deal with the invokation of your application code.

提交回复
热议问题