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.