Real benefits of object oriented php code

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 7
Joined: Sun Sep 02, 2018 10:33 am

Sun Sep 02, 2018 10:37 am

There can be procedural and OOP PHP coding. OOP is the current standard and most people would recommend to use this.

1) I know that I put one class per file and I use namespaces. All classes go in one folder, lets say. Do I write all these classes up front or how does it work? I understand that this is somehow the "root" of the application and I can use these classes in some other files. Would you be able to explain how the actual writing process works?

2) What are the real benefits of the OOP over procedural. I have 5 procedural apps and the same apps written in OOP. What are the real benefits of this. Like reusability of classes? Any other things? Why do the OOP.

3) What could be bad about procedural (cons of procedural).

How does the actual OOP coding proces works and pros and cons of both.

Post Reply