Live data from Hacker News

25 Years of PHP

jetbrains.com

31–40 of 426 posts

Re: 25 Years of PHP

#31
post #20

I wish more digital subscription models were more like the jetbrains one. If you paid for one year continously they handle it like you own that specific phpstorm version, even if you cancel your subscription. That said, I wish I could subscribe without having a company ._.

I have a personal license, you can absolutely subscribe without a company.

Re: 25 Years of PHP

#32
I wrote a lot of PHP from 1999-2008. First as a hobby, then professionally. From 20 LOC guestbooks to payment gateways used to process millions in payments. It wasn't until recently that I was sure I'd written more code in any other language than PHP. These days I'll occasionally poke around with it or patch a bug, but that's about it.

Is it a perfect language? No. But which language is? (I can hear the Lisp crowd grumbling.) It's fast. The only ceremony you need to write executable code is the My only real gripe with PHP is the annotation syntax. Yikes. Stuff that's in comments SHOULD NOT AFFECT RUNNING CODE. Who came up with that?

PHP has taken a lot of flack over the years. Mostly from people who never really worked with it. A lot of the criticism really should have been aimed at certain PHP developers, rather than the language or the community at large. PHP's low entry barrier is a blessing, it's how a lot of developers were introduced to programming. It's also a curse, because a lot of very inexperienced programmers managed to become prolific at getting code out there, code which was ugly, bug infested and a security nightmare. But it's not fair to attack a language over its inexperienced users.

Re: 25 Years of PHP

#33
post #25

Earlier quoted context omitted.

Once or twice a year I have to peak at the code of a C app that was developed by interns more than 10 years ago. No framework was used, max 3 letters variables are the norm, no blank lines and the only comments are from code copy pasted from examples. These days I would be more inclined to celebrate the death of C than its birthday !

I'm not sure why this comment identically copies the GP with the exception of the last line, but it doesn't appear to be a spam account.

I switch PHP to C to show OP in a mirror how ridiculous his statement is.

Re: 25 Years of PHP

#34
post #6

PHP is damn fast now, no joke. And with all of the modern features it's actually not so bad to work in. I'm becoming increasingly puzzled every time I see PHP hate now, especially when I read tired comments like "just use rails". Laravel is arguably as good or even better than rails at this point, and PHP 7+ is definitely light years faster and lighter. One thing that still sucks is package management / composer.

Composer 2 is coming, and so far it’s shaping up to be vastly improved. Also, many people are still using that ‘fractal of bad design’ article from years ago to bash on PHP, even though a number of the assertions are no longer applicable.

The point of calling a "fractal" and talking about the "design" is that while you can only look at the surface in an article of reasonable length, it points toward strutural and systemic failings within the language itself.

The problem is that PHP is built on bad foundations and while many of the superficial problems can be mitigated, the underlying foundations can't be fixed without breaking changes. (Or, as Python proved, even if you make breaking changes, you may still not fix many core issues.)

All languages get this way over time, usually as decisions that made sense early on become baggage. But when a language makes poor decisions early on, it accelerates that timeline.

Re: 25 Years of PHP

#36
post #32

I wrote a lot of PHP from 1999-2008. First as a hobby, then professionally. From 20 LOC guestbooks to payment gateways used to process millions in payments. It wasn't until recently that I was sure I'd written more code in any other language than PHP. These days I'll occasionally poke around with it or patch a bug, but that's about it. Is it a perfect language? No. But which language is? (I can hear the Lisp crowd gr…

> My only real gripe with PHP is the annotation syntax. Yikes. Stuff that's in comments SHOULD NOT AFFECT RUNNING CODE. Who came up with that?

It's a workaround to copy Java's annotations which IIRC also came from javadoc. PHP-8 is adding proper annotations as well. In general being able to add parseable meta information to your code can be quite useful.

Re: 25 Years of PHP

#37

What ever happened to the PHP-FIG? I noticed in the timeline projects kept dropping from it in the past 2 years. It seemed to have a lot of momentum for a while producing PSRs that were very widely adopted.

Afaik after the whole PHPixie scandal, they got backlash but the PSR standards they adopted are still in use.

PHPixie thread: https://groups.google.com/forum/#!topic/php-fig/cjLBp2weYaA

Re: 25 Years of PHP

#38
post #25

Earlier quoted context omitted.

Once or twice a year I have to peak at the code of a C app that was developed by interns more than 10 years ago. No framework was used, max 3 letters variables are the norm, no blank lines and the only comments are from code copy pasted from examples. These days I would be more inclined to celebrate the death of C than its birthday !

I'm not sure why this comment identically copies the GP with the exception of the last line, but it doesn't appear to be a spam account.

Previous poster is making a joke, replacing PHP with C

Re: 25 Years of PHP

#39
post #17

[flagged]

Ah yes, the classic "my application is shit so the language must be shit" straw man argument. Sorry to hear you have to work on shitty code. But neither the choice of language nor the lack of framework are to blame. Blame the developers and/or the organizational culture that caused it to be in such a poor state.

> But neither the choice of language nor the lack of framework are to blame.

This is partly true. It is possible to make something great with substandard tools. I suspect a master craftsman with a set of dull saws and blunt chisels using his shoe for a hammer will still have the skill to create something pretty good.

But it will be frustrating, and most people aren't master craftsmen so what they will produce will be adversely affected by the quality of the tools. If you give most people better tools they will have more chance to create something good.

PHP is the rusty saw of the programming world (and yes, I have spend a fair amount of time programming it).

You absolutely can create something great in PHP, but the sheer amount of gotchas and edge cases mean that for a lot of people it's hard to produce something good. There are a lot of people out there who aren't master craftsmen at PHP, and this is reflected in the frequency of the low quality PHP application that are out there.

Re: 25 Years of PHP

#40
post #29

I started with PHP 15 years ago, but after 5 years I just moved to Java. The worst thing with PHP was people and standards, everything was a mess, there was no right way to do stuff and larger projects had like 100 different implementations for the same thing. PHP was really challenging to work with as coming to a shared agreement for how one should implement stuff was a recipe for personal conflicts. So after a few…

Symfony really paved the way for quality PHP code. Excellent Web framework which is a lot of fun.
Post reply on HN