In many ways PHP is just now starting to come into its own
gist.github.com
In many ways PHP is just now starting to come into its own
1–10 of 133 posts
Re: In many ways PHP is just now starting to come into its own
#2The language remains as bad as it was 7 years ago, and they seem to be woefully unwilling to actually fix it.
Re: In many ways PHP is just now starting to come into its own
#3This just won't ever happen. The people that wanted to drop PHP for something else (Ruby, etc) largely did so years ago. The hosting/running situation for PHP is just too basic and easy for people to get in to vs having to 'run a server' (Rails, etc).
PHP is still the only language that assumes HTML output by default. Put a file on a web server, hit it via a URL, and get HTML output. It's that simple. You can start at 'simple' then graduate up to complex stuff like Symfony if/when you want to. Every other language or platform forces a lot of extraneous concepts on you on day one, which is always going to be a turn-off for a not-insignificant portion of the people coming in to the field.
Re: In many ways PHP is just now starting to come into its own
#4While it's certainly true that PHP is better than it was 7 years ago, that is primarily in the ecosystem and not the language. The language remains as bad as it was 7 years ago, and they seem to be woefully unwilling to actually fix it.
Re: In many ways PHP is just now starting to come into its own
#5While it's certainly true that PHP is better than it was 7 years ago, that is primarily in the ecosystem and not the language. The language remains as bad as it was 7 years ago, and they seem to be woefully unwilling to actually fix it.
The only real option is to give up backward compatibility, to then throw out every broken language feature, and to then reimplement them properly. Unfortunately for those two languages, that would involve an awful lot of stuff getting thrown out and reimplemented, which is very likely why it hasn't happened yet.
Given how much core functionality needs to be reworked in both cases, I don't think they can really be saved. There are numerous other better languages out there, and it's easier just to use them instead of trying to salvage PHP or JavaScript.
Re: In many ways PHP is just now starting to come into its own
#6While it's certainly true that PHP is better than it was 7 years ago, that is primarily in the ecosystem and not the language. The language remains as bad as it was 7 years ago, and they seem to be woefully unwilling to actually fix it.
The author makes a good point that people like me who ditched PHP in the mid-2000s should probably stop complaining about it since we don't really know the current state of affairs.
The problem is when we have languages like Ruby, Clojure, Scala, Haskell, or even plain old Javascript ala Node, why would I waste another thought on PHP? PHP was created to make very simple dynamic web pages, and I would still use it for that in the way that I still write bash scripts for simple shell operations to avoid a higher level dependency like Ruby or Perl. I'll use PHP for small stuff, but I see no benefit towards putting any real engineering effort into a PHP project.
Re: In many ways PHP is just now starting to come into its own
#7While it's certainly true that PHP is better than it was 7 years ago, that is primarily in the ecosystem and not the language. The language remains as bad as it was 7 years ago, and they seem to be woefully unwilling to actually fix it.
I'm a big fan of python and I think that very intelligent people are behind its architecture, but honestly most of the money I made through the past years came from php websites that I can build really fast.
I have eventually used python (fabric) to automate creating php websites.
Re: In many ways PHP is just now starting to come into its own
#8While it's certainly true that PHP is better than it was 7 years ago, that is primarily in the ecosystem and not the language. The language remains as bad as it was 7 years ago, and they seem to be woefully unwilling to actually fix it.
What you say is very true. PHP is in the same boat that JavaScript is in. Their very severe, yet very inherent, language flaws just cannot be covered up with one library or framework after another. The only real option is to give up backward compatibility, to then throw out every broken language feature, and to then reimplement them properly. Unfortunately for those two languages, that would involve an awful lot of s…
For example they have now deprecated the dreaded mysql_, pgsql_ interfaces (including mysql_now_escape_the_string_for_real() and the like ;) for accessing the database in favor of PDO.
They will be removed in the future. Lots of projects still use those.
Just 1 example of PHP dropping backwards compatibility. It's not quite so bad as you make it out to be.
Re: In many ways PHP is just now starting to come into its own
#9While it's certainly true that PHP is better than it was 7 years ago, that is primarily in the ecosystem and not the language. The language remains as bad as it was 7 years ago, and they seem to be woefully unwilling to actually fix it.
How would they fix it anyway? It was never really designed, it just evolved as a slow accretion of features using whatever syntax was convenient in the parser codebase over a couple of decades. The author makes a good point that people like me who ditched PHP in the mid-2000s should probably stop complaining about it since we don't really know the current state of affairs. The problem is when we have languages like R…
Javascript wasn't made for large applications. It was made for form checking and rollover menues (some of the earliest examples back in the day) ;)
It can be argued that Javascript has many unfixable design bugs, too. Just sayin.
Re: In many ways PHP is just now starting to come into its own
#10Symfony2, my framework of choice, has a very mature and solid architecture and offers anything you could imagine from other frameworks. The code is clean and maintainable if done right and still its extremely flexible and extensible. It also depends on PHP 5.3 which has Namespaces, closures, lambdas etc. So id argue its up there with any of the other top Frameworks, it might even be the best. While its true that there are languages that are more beautiful to work in, i dont think its all that bad. For me, the biggest flaws of PHP are present in any dynamic-typing language. The syntax is just stuff to get used to once and be done with it.