Edit: I am wrong, not everyone hates PHP.
Edit: I am wrong, not everyone hates PHP.
It might not be the most popular language around the HN crowd, but this forum is subject to trends and "emerging technologies" - not necessarily to say that these technologies are better or worse, just that they are the flavor of the month.
It's hard to argue with the numbers, PHP is still the most popularly used language [1] and while the gap is being bridged, it is really minuscule in comparison. I'm sure that while you may hate PHP, not every single developer does.
Yes, yes, down vote me, I'm a proud PHP developer and to even utter such words on this site seems to result in the most powerful of criticisms, but subjective to this entire argument is that behind every person who writes PHP is a ruby coder, tutting and shaking his head, stood behind him is a Node.js developer, laughing at him, behind him is somebody writing Assembly, scowling in to the distance in disgust, behind him is a C coder, eyes wide with surprise that someone is working in Assembly, etc.
I give it a few years until people are crying out loud on here that Node.js is dead and superlanguageemulator.pm or whatever comes next is the only way to code, at least, for people wise and intelligent enough to embrace this new technology.
[1] http://w3techs.com/technologies/overview/programming_languag...
They don't say how they determine whether a technology is being used server side -- it could be only if they see ".php" URLs on the site, for example, which would mean there would be a strong bias against languages that make it easy to write sane URLs.
They also don't share what % of sites they're able to make a determination for at all, so these numbers could be based on a statistically insignificant sample.
JS is on the rise, but no one hires anyone to write just JS. It's usually JS and PHP (and of course, HTML, CSS).
And another point, outside the bubble (I mean a place like Florida) it's hella easier finding a decent PHP guy than Python (or Ruby) guy. I learned that the hard way.
The job market in CA is very different to pretty much everywhere else in that emerging and niche technologies tend to be under-represented outside of CA, most likely because of budget constraints in web development, most clients want a simple Joomla or WordPress site and couldn't care less about anything else as long as they don't have to pay over £2,000 for it.
I've never received offers for anything else.
You are joking. Right?
There are many good job opportunities for JS developers. I don't know where you got the idea otherwise.
FWIW, I was hired to do just JS.
This is false. It is very easy to make sane URLs in PHP. You just designate index.php (or whatever you want, actually) as the default index in your http server. In fact, that's how it works in every language?
It just doesn't have xmlrpc_encode_request() with the exact method signature.
P.S.: I am wondering if it is normal to have functions marked as EXPERIMENTAL with a biiiig warning sign for 11 years in the language? That really scares me. This function has been introduced in PHP 4.1.0 which was releases in 10-Dec-2001... That's just...
edit: removed rant about xmlrpc_encode_request being built-in. It's a non-default extension, apparently..
You think PHP is short because you have functions like xmlrpc_encode_request and the equivalent in Python is 20 lines. What you don't see if that xmlrpc_encode_request is pages and pages of C code and PHP macro's behind the scenes. That function should be in a library, not in a programming language, which is why PHP is more comparable to other web frameworks, not to other programming languages.
I realize this is beside the point, but I'm willing to fix it myself.
The reason the examples appear longer is because the website is documenting how to implement PHP functions in Python. Since Python is not PHP, it won't implement line-for-line replacement functions.
The examples here are kind of disingenuous to that, but if you start writing code that takes advantage of the features of Python, your lines of code should be less than PHP or equal.