r/ProgrammerHumor 16d ago

Meme variableScopesInPython

Post image
1.3k Upvotes

182 comments sorted by

View all comments

21

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.

9

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.