DEV Community

Discussion on: Pitch me on PHP

Collapse
 
wesen profile image
Manuel Odendahl

Don't take people's opinions on programming topics too seriously, form your own opinion. Not that you should look into PHP, but if you don't understand the reason why someone thinks a technology is bad, it often means the person stating that actually doesn't know either.

Thread Thread
 
simeg profile image
Simon Egersand 🎈

+100. Don't listen to me :D I made a joke. PHP is (was?) known for having inconsistent API but I am not an PHP expert by any means.

Thread Thread
 
pinotattari profile image
Riccardo Bernardini

I have some experience with PHP, although I wouldn't call myself an "expert." However, the inconsistency of the API is the first thing I noticed. Ruby has been designed with the principle of "minimal surprise," PHP seems designed to maximize the surprise.

Fortunately, there is a nice manual online, without that programming in PHP would be a nightmare.

Thread Thread
 
wesen profile image
Manuel Odendahl

There's also some good replacements, for example the laravel helpers. I very rarely use the standard library.

Thread Thread
 
jacekandrzejewski profile image
Jacek Andrzejewski • Edited

It does have inconsistent api for functions, however the reason is that function names are same as underlying libraries function names.
So there is strpos and str_replace (str meaning string), but they differ in naming because strpos is from one library and str_replace from other.
That is the short explanation at least.