top | item 31270457

(no title)

pdenton | 3 years ago

This site provides a nice overview, cool. It makes me wonder though, because IMHO PHP is adding too much new features that are often somewhat half-baked. What would be better is to have an actual specification to improve the core language. IIRC, Python gradually adds features where they are opt-in first (from __future__ import foo).

I'd gladly take a language which offers stability and gradual improvement over a language that just keeps adding new toys to play with. The software development cycle can take many years and from my experience, changes in the language or runtime are a burden.

But my biggest gripe isn't with PHP, it's that cheap web hosting still comes with PHP and MySQL. And I honestly can't blame them.

/rant

discuss

order

gog|3 years ago

I am working on a ~10 year old PHP project, the amount of changes that needed to be made in the last decade because of the changes in the language are almost non-existent.

But using new features is nice and makes the code better, there are even projects (rectorphp) that can automate using of new features in the existing codebase.

motogpjimbo|3 years ago

The only time I've ever had to update legacy code due to a breaking change in PHP is when an old encryption algorithm was withdrawn and I had to write a migration to decrypt and re-encrypt the data we'd originally encrypted with it. Apart from that (and a few notices sent to Sentry) it's been smooth sailing over the years.

kyriakos|3 years ago

upgraded a large badly written php 5.6 codebase to 7.1 then 7.4 and then 8.0. first jump took about 3 days of work to iron out issues then going to 7.4 and 8.0 was even quicker. using the php compatibility checker helped a lot.