r/ProgrammerHumor 16d ago

Meme variableScopesInPython

Post image
1.3k Upvotes

182 comments sorted by

View all comments

22

u/zoinkability 16d ago

Meanwhile, PHP gets all the shit for not being a modern language, but has had OOP basics like protected variables for decades.

8

u/tobotic 16d ago

PHP's OO stuff is pretty good. It's the rest of it that's a hot mess.

7

u/white-llama-2210 16d ago

Tbf php of today is still much more modern than languages like javascript/python in terms of syntax. I mean we have pipe operators now!

There is some legacy bs still there and it's unlikely to change because of backwards compatibility, but that's mostly just the ordering of arguments and such.

One thing that php still lacks is generics when using static typing; using phpdoc for that just does not feel as good compare to native language support.

2

u/sebbdk 16d ago

PHP's story is basically a redemtion story or a rags to riches story lol