Answer the question
In order to leave comments, you need to log in
Procedural style or PHP OOP?
Hello, I want to ask you for advice.
What is better to use for a php site? OOP or procedural style.
And is it possible to write an engine for a site in a procedural language?
Answer the question
In order to leave comments, you need to log in
Procedural for sure.
If such a question arises in principle, it means that the author does not understand OOP from the word "absolutely". And as a result, when you try to write your own classes, you will get hellish trash. Therefore, only procedural. There will also be trash, but not hellish.
A more difficult option is to look at the calendar, find out that now is the second decade of the 21st century, and finally stop using PHP the way it was used in the last millennium,tinkering with every little task on my own in pure PHP. After that, take a tutorial on a modern framework like Laravel or Yi, read it, and start making a website with the help of ready-made classes that have already been written for you, and which take on 80% of the rough work, and at the same time make it 100500% better than your own self-made code (because it takes into account a million nuances and rules that you don’t even know about). As a result, in fact, the site will turn out using OOP, but not in the sense that the author had in mind (to write everything from scratch).
What is better to use for a php site? OOP or procedural style.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question