T
T
themailvnk2014-10-29 08:05:46
PHP
themailvnk, 2014-10-29 08:05:46

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

3 answer(s)
F
FanatPHP, 2014-10-29
@FanatPHP

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).

A
Anton Shamanov, 2014-10-29
@SilenceOfWinter

What is better to use for a php site? OOP or procedural style.

Stupid question: which hand is better to use - right or left? what if i'm left handed?
And how do you think they were written in PHP4?

V
Vladimir, 2014-10-29
@azrail_dev

The only way to understand is to start writing a website. OOP must be used wisely.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question