Is OOP worth using in PHP? -


There are many debates on whether object-oriented programming is good or not. However, the use of OOP in PHP is slow. Will it be a good business for procedural programming and slow speed and OOP use (since classes have to load a page every time and bigger websites start slow).

More importantly, whether it is good to wrap the material inside a class and use a stable work, or would it be better to lie with the prefix: wp_function ().

Yes, this is almost always a good idea to use OOP. This is because OOP is a style of coding, and coding styles for the most part are easily able to move into languages.

People do not use coding styles because they use a certain language, people use coding styles because the style of coding provides good ways of doing things they feel Are desirable. Therefore, as long as there are original elements (heritage, class properties, etc.), it will always be feasible to write in that coding style.

No, the use of procedural tasks to reach them is probably not a good idea. The reason for this is, you probably have to do something to keep the state.

  function myFunc () {global $ class; $ Square & gt; DoMethod (); } Function myFunc2 () {global $ square; $ Square & gt; DoMethod2 (); }  

This is a bad idea because it makes a ton of global state.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -