Hacker Newsnew | past | comments | ask | show | jobs | submit | inovica's commentslogin

I still love PHP. 23 years ago we created some encryption software for it and it is still going. I also run a PHP newsletter. There's still a strong community of people and whilst there are other languages which I also use (Python, Node.js) I still find myself gravitating towards PHP for fast and simple work

The only issues I have. is that this is a 'double edged sword' in that PHP has become far more complex since the launch of PHP 5 and so it isn't as easy to understand from scratch as it used to be


PHP is a perfect example of how to undergo major transitions correctly.

In the time that it took Python to go from Python 2 to 3, PHP underwent 5.2 -> 5.3 and 5.6 -> 7.0. 5.3 changed how you write PHP in a fundamental way by introducing namespaces and PSR0 autoloading. Then, 5.6 -> 7.0 cleaned up the parser, resulting in massive speed improvements.

They did this by not breaking the universe in these major updates...or really, any of there updates. Each update would break a few specific things, warn you about a few other things that were going to break in the near future, while giving you ways to shim the old behavior if you _really_ needed it.

They also gave you ample carrots reasons to update - aside from what was already mentioned, my personal favorite update was PHP 5.4 because it introduced short array syntax, made UTF-8 the default charset, introduced traits, and finally put register globals and magic quotes out of their misery...but giving you a shim if you had some ancient project that needed it.

If you're wondering why PHP 6 was abandoned, it was because it was an update in the style of Python 3 by breaking strings everywhere. In retrospect, I think the decision to cancel 6 was the right one. Somehow, I doubt that PHP would've had the influx of data science and AI that saved Python 3.

Hats off to the project - I've long been off of the CGI-style web development narcotic, but the language put food on my table for quite some time, and the people steering the language treated their community well.


> They did this by not breaking the universe in these major updates

I don't think the amount of breakage per se was the problem with Python 3. I think the problem was that for a long time (until u"" strings in 3.3? four years after 3.0?) there was ~no way for a library to support both 2 and 3 in a single codebase. That meant that each project had to either maintain a fork, or do a "flag day" migration, which in practice meant you couldn't migrate until all your dependencies were migrated. Big mistake in retrospect.


> I don't think the amount of breakage per se was the problem with Python 3.

The lack of u"" is just another manifestation of the complete breakage they wrought upon Python's string handling, isn't it?

It was closer to a decade (3.7) till they'd put enough of the bits they'd ripped out back in for Py3 to be suitable for the things I used Py2 for.


I've seen a few other comments also talk about PHP becoming more complex. However, I have "simple" code built using 5.3 and it works perfectly fine in 8. So I guess it CAN be complex, but doesn't really need to be. The biggest changes I would make to that code are fixing the multiple 'switch' and 'if/else' blocks to an anonymous function or some mapping... but it's not required.

This is true. As long as only one person interacts with the code, all languages can be simple. C++ can be simple.

But once multiple people are involved and I have to read someone else's code, then I really start to appreciate languages with less features. There are some language I love to write code in, like Ruby or Haskell, where I feel like a damn genius when I write it, but want to pull my hair out when I have to read someone else's code.


> 23 years ago we created some encryption software for it

ZEND?

I remember "nulling" software in the mid-00's and Zend was always a terrible ball-ache.

Which, if that was your project, is high praise. :)


I think PHP 8 is easy to understand if you write it from scratch, you just have to learn doing things the right way, read up on PSRs and so on. It is a bit more complex but much more secure and supports quite a lot of things now that are definitely helpful to have.

Sounds great. Do you have a blog or anything online about your project?


Unfortunately no.


In some respects, true, but that isn't always the case.

Say you own a company in the UK which sells widgets, but you also own an offshore company that also sells widgets. If you are dealing with a Chinese company, you could use the offshore company to do the deal, paying little to no tax. The money then resides in the offshore company and has never gone through the UK - either as a business or personal. As an individual you could own a credit card that you use to spend in the UK, which goes back to the offshore company. In additional, the offshore company could buy property in the UK and no tax is paid. There are various other tricks and nuances that can be employed to help minimise tax paid - completely legally.


I bet it isn't always the case too, right? I actually wanted to say that the fact of owning a foreign corp doesn't mean anything. It may be used to avoid some taxes, or may not.

I can even give opposite examples, like when someone comes to the US to run a startup in California. For the country of their origin they definitely opened an offshore corp (in the US in this case) and don't pay taxes on it (they still pay to the US gov though). It's just more convenient to have a US corp rather that a corp in their home country, and not because of taxes which may be higher in the US.


This is probably correct and a lot of software still uses PHP. Wordpress being one of the huge ones. I actually see a lot of people still developing in PHP, though my own involvement finished years ago. I think because we sometimes operate in a bubble, it's always a surprise to see this


Often meeting your hero's does not go well, so pleased this did for you :)


Fully agree. It takes some thought :)


We created a fun side project to grab the index page of every domain - we downloaded a list of approx 200m domains. However, we ran into problems when our provider complained. It was something to do with the DNS side of things and we were told to run our own DNS server. If there is anyone on here with experience of crawling across this number of domain names it would be great to talk!


25 pages in the morning and 25 pages at night. Done it for years. I have 2 kids. Its not always exactly these numbers, but its not far off and I try to keep to it.


I agree. Using something as a basis isn't a bad idea and I have benefitted from this over the years. You DO need to understand what you are doing and not just blindly copy, but having a starting point is often very useful


Drop me a message. I've started and run several ventures, a couple of which became more than lifestyle. Nothing is done alone though - there are always people who help you on your journey; employees, friends, mentors, family. Happy to point you in a direction


Great, thank you. PM'ed via LinkedIn.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: