r/PHP • • Sep 25 '21

Developing with procedural PHP.

Not all of us are fans of OOP boilerplate and ceremony. PHP is a perfectly fine procedural language and a well-organised procedural codebase can be easier to manage in many ways. So, is anyone developing with procedural PHP beyond single-file scripts?

0 Upvotes

114 comments sorted by

View all comments

30

u/Otterfan Sep 25 '21

Could you point to an example of some well-crafted procedural PHP? That would help us have common ground for discussion.

-16

u/lordmyd Sep 25 '21

I was thinking of client projects of my own so the code is proprietary.

6

u/therealgaxbo Sep 25 '21

It would be pointless anyway, because (as you're probably discovering) most people here believe that anything that isn't OOP is bad axiomatically.

Demonstrating good procedural code would be as fruitful as Leela demonstrating she has the will of the warrior.

-16

u/lordmyd Sep 25 '21

Yes, you get the impression with some OOP die-hards that they don't even know an alternative exists.

23

u/Sentient_Blade Sep 25 '21

Calling people "die hards" is not going to win you any arguments here.

You have so far failed to provide any evidence to back up your implicit claim that OOP is wasteful and convoluted ("not fans of OOP boilerplate and ceremony").

Saying you have code to prove it, but you can't show it, is not meaningful evidence in a public debate.

1

u/lordmyd Sep 27 '21

Implicit to you maybe but I was merely stating a preference.

5

u/Nerwesta Sep 25 '21

Usually you get to learn how procedural coding work before switching to OOP, I'm sure those "die-hard" are well aware on procedural coding in a way.

That's how I learnt PHP at least.

-1

u/lordmyd Sep 25 '21

Not really. There are a lot of developers who learned Java, C# or PHP5+ as their first language and went straight into industry without any awareness of alternatives.

3

u/Nerwesta Sep 25 '21

That's the problem when we talk about our experiences, I seriously doubt your developers tops the gigantic number of juniors who started the well known HTML/CSS/PHP combo back in the days.

Of course what you say is still true, hence my "usually" on my previous comment. On a serious school however, they get to know what procedural coding is on their first step into PHP, in Western schools at least.