Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 518661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:57:35+00:00 2026-05-13T07:57:35+00:00

This is part observation, part question. First the observation: While everyone talks of modular

  • 0

This is part observation, part question.
First the observation:
While everyone talks of modular programming, OOP, procedural done right, aspect oriented, design patterns, etc., several popular opensource PHP apps are plain script files with the structure being controlled by includes and requires.

This looked stupid to me till I faced a recent issue with my shared web host – they don’t support MySQL stored procedures on shared hosting. I checked out many competing shared hosting packages – same story.
Then I rewrote the code using SQL queries and some static functions in DB-handling class.
That was when I realised that the said PHP projects actually take into account the whole spectrum of web hosting packages and so decide to keep the code as dumb as possible, so as to reach a wider user base.
The other thing is the reach of the script to newbies without a formal Software Engg background: Scripts are easier to hack for newbies.

Those two were the good reasons I saw to explain the phenomenon.
Make no mistake, the guys maintaining these projects are pretty good at software development, so it is not incompetence.
Sometimes they have spare cash too.

Now the question: What other sensible reasons can you think of?


EDIT: I personally feel that it’s not about OOP alone, as pointed out by others, good code structure is not dependent on OOP/Procedural style. I’ve seen and coded a few functions-based PHP projects myself.

The thing that bothers me most is that the folder/filesystem layout is good, the file/folder naming is great, documentation is plenty, standards are followed, but, when you open the file to read the code, there’s a hundred if-then-else conditions, version-checking, odd use of output buffering here and there, cookie manipulation code, some constants, includes, and no clear structure in many files.

At least I seem to be lost every time I try reading the code. But if I read code from Java or C# code bases, or even some other sidelined PHP apps – there is proper separation of code inside functions, templating is used for display and so on. Looks organised. Looks easily understandable.
Backward compatibility could be the issue for maintainers, but they would be open to making the next version in a more structured way. But that too does not happen!
Obviously, I’m missing something because those maintainers always work hard, after all.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:57:36+00:00Added an answer on May 13, 2026 at 7:57 am

    i see 3 main reasons:

    • compatibility: PHP did not include OOP from start on. to be down-compatible with older PHP environments and to reach a wider audience, you’re keeping the status quo.
    • effort-switch: switching/refactoring a codebase fron non-OOP to OOP is a lot(!!) of work, transformation script in my view aren’t a solution, because they tend to generate code for machines and not for humans. this is OK from runtime aspect but horrible for maintenance.
    • team-culture: i talked to some PHP developers, some just don’t want to make the switch, because they say everything is good and working…
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I read about this Article I wondering about this part: try { //First try
What does the this part of the following line of jQuery do? $('span:visible:first', this);
Firstly, this is just an Object Oriented Programming question and does not apply to
This part of my code works fine: #include <stdio.h> int main(){ //char somestring[3] =
This part of my code is used to award a grade to a student
This part of an app that I am working on, I have the following
I have this part in a method, It should return the page and headers
It seems that this part of my code is where the exception occurs: c
For some reasons this part where I fetch JSON data from following url will
I have this part of the function : $jQ('.product-collateral .product-tabs li').each(function(index){ $jQ(this).attr('id', $jQ(this).find('h3').attr('class')); if(index

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.