Why do some people hate PHP? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why do some people hate PHP?

I'm choosing between Python and PHP for back-end development and it seems to me that PHP is more popular (even some popular CMS's are built on it, as I know). But I meet people on forums who don't like or can't stand this language. What is the problem?

13th Aug 2018, 9:18 PM
Alexander Genin
Alexander Genin - avatar
3 Answers
+ 5
Because. 1. Python has a philosophy that helps to write better for understanding code. 2. Language evolution planning using PEPs - you know what you get in a next few years. PHP development process looks chaotic: making OOP like a something in Java, then add some "static typing" collections, then include some lambdas and namespaces (almost after 15 years of development). What's next? 3. Python has more compact and clean syntax that helps developers, 4. In Python the same things can be done the same way. There is no matter what iterable things you using (list, tuple, string  or something else) you always can access by index, get a slice, iterate  over it or get the length the same way. No strlen()/count(), substr()  and a lot of other functions. 5. More predictable and strict. No 1 == "1" and other strange things like in PHP. 6. Python has more unified and powerful standard library. It has some problems, but python's included library much better than PHP's.
14th Aug 2018, 10:50 AM
Maninder $ingh
Maninder $ingh - avatar
+ 1
The problem is that Python developers hate PHP developers and PHP developers hate Python developers! There is in fact no problem, choose the easiest language! Python has an very easy syntax! Try it! Or not...
13th Aug 2018, 10:08 PM
Théophile
Théophile - avatar
0
Maninder Singh, after your words I can conclude that coding on PHP is inevitable necessity nowadays for most developers. But why PHP became so popular after all? PHP and Pyhton were released roughly at the same time, if I'm right. P. S. Thanks a lot for such a full explanation.
14th Aug 2018, 11:11 AM
Alexander Genin
Alexander Genin - avatar