Learning PHP more Easily by Learning Python … what!?
PHP is probably the best web app development language out there today for a bunch of reason technical, and market oriented. But it’s not the only language out there and it doesn’t have a monopoly of good programming.
Comparing Programming Languages
An important lessons that my 20+ years of programming experience has taught me, is that one of the best ways to learn one programming language, is to learn another! By learning different programming languages, you will start to gain deeper insights about your first programming language.
Here is the key point, most modern programming languages share about 98% of the same principles and language constructs. That said, each language has their own subtle take on how they do things. So for example, PHP creates functions with this code:
echo "I love peas!";
Python (like so many languages,) has functions too. Python creates function with this code:
print("I love peas!")
… Different code/syntax, same concept.
A funny thing happens when to express concepts in different languages: you get a better understanding of the concept. So learning how Python treats functions, will allow you to understand PHP functions better. This really becomes interesting when you get into more advanced concepts like anonymous functions, collection types and OOP.
So if you want to improve your PHP skill, learn some Python!
Note: As and added bonus, learning Python will open you up to a whole new type of programming, like Ai, ML and robotics.