Posted by Jesse Boyer & filed under Python.

There are so many things about Python I could only dream PHP had. Based on the Python syntax itself. Well, that’s not true, PIP is also quite the handy package manager (Until you install MySQL on Windows). PHP has Composer, but I didn’t find it nearly as elegant as PIP.

It’s a tough sell to compare Python vs PHP but I’ll do my best with some basics. There is no centralized framework in PHP either, I hate this fact more than anything. “Zend”, the PHP company has their fingers in the cookie jar with PHP and produced Zend Framework 2. In my opinion it’s even worse than the first. I believe it is a complete waste of time that produces the likes of Magento.

Python vs PHP Frameworks

Zend Framework… I think decoupling has a limit. ZF is like making thousands of file containing one sentence — then joining all the sentences together to make a book. It’s impossible to work with unless you have an IDE that jumps to classes and methods. You’ll get buried in 5 files to find out what something is really doing.

A colleague of mine, Nick Whiting, sat over my shoulder with his ruthless unyielding tyranny of instruction showing me the ropes of Django. What an experience that was, it was a mental beating that is paying off. All I want to do is learn more Django. I’m reluctant when using auto code generators, but boy does it save time building out admin panels. My point is, Django is considered the primary go to Python framework where-as PHP has 101 options.

Built In Functions

This post isn’t about frameworks so much though.  I love writing in PHP, but while I look at Python vs PHP there is a huge gap. PHP’s namespaces, object connectors, altering needle/haystack, and global function name mismatches makes me feel like I’m in 1996 writing PERL. Then the glorious gold and blue snake arises shimmering in glory.. Boasting it’s method decorators, function keyword arguments, unlimited arguments (Correction via Nick — “Up to the Python Memory Limit“) — Yes PHP has a func_get_args() but it’s not the same. In Python you import only what you want to use, and the code looks like it was typed only to look good. I’ll be fair and add that neither have method overloading which really sucks.

I’m much more fluent in PHP so I would think I’d favor PHP over Python. Or perhaps I’m just tired of everything being “the next big PHP startup”. I don’t know for sure. When I use Python, typing it feels so right and pure. It’s like every space-based-tab is a compliment to how well you are doing all the while encouraging you to perfect your line spaces to make it look like a work of art. It’s like eating fresh honey out of an abandoned hive after a long stroll through the enchanted forest.

Overall Desire

However, one thing I wish both languages had was a super strict mode which allowed the languages to be typed. I would love for a server-side typed language that is not C#.

Since I brought up C#, Visual Studio is seriously the best IDE I’ve ever used. The language itself is a masterpiece by Microsoft. But I do not want to write in a proprietary language that will cost more to host. C# also has method overloading.

One Response to “Python vs PHP Rant”

  1. Nickolas Whiting

    “his ruthless unyielding tyranny of instruction”

    “Evil Laugh” – Hahahahahahaha

    Also Python is limited to 256 arguments … unless you are using *args or **kwargs then its memory limited.

    Reply

Leave a Reply

  • (will not be published)