Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Hmm no, not at all. My first job in 2002-2004 was using PHP4. I barely used classes (and if I did they were just my code, not from the library because I didn't need anything from PEAR) and used the original MySQL client API. Almost nothing of what I used back then would be useful today. PHP4 vs PHP8 is almost more different than Python 2 to Python 3.


sort by: page size:

Thanks for taking the time to reply! I still feel more comfortable with PHP, but I guess it doesn't hurt to start learning more Python.

That's a very weird argument. I pretty much exclusively use Python 3, so to me it seems hugely successful, where as I didn't even know that PHP7 existed.

PHP 4 to 5, which was what my comment was about, took a middle path and had success much faster than Python did.

Given how much you like Python, I'm surprised at the gall to argue that Python had more technical debt to clean up than PHP did.


It doesn't matter what you do. The vast majority of code I'm using from other people doesn't. Even my personal python methodology differs from yours.

Plus, you now have to teach and evangelize your method versus the dozens of others out there. It's crazy town.

The negative thoughts and feelings I once had for PHP are now directed mostly at Python. PHP fixed a lot of its problems over the last decade. Python has picked up considerable baggage in that time. It needs to take the time to do the same cleanup and standardization.


As a PHP developer I refuse to use Python because I know how unwieldy it's felt whenever I've had to do serious work with it.

To each their own, but even PHP's setup these days is way ahead.


I don't think so, i've used PHP at work for more than 10 years till 7.4 point mostly Symfony, it has it's own quirks but i still feel PHP really pragmatic. I don't have any strong feelings against it.

Nowadays im on django/python because im in a python shop and I like python too.


Python 2 is nowhere near as lacking as PHP4. Which is probably a big part. But even then it took a big campaign and large software like Wordpress declaring that they would go PHP5 only.

Now I see your perspective, and I definitely agree with you, but I'm not sure the Python situation isn't a special case. For PHP though specifically, consider the changes that 5.4 brought. I think for all those changes, it went pretty smoothly bringing most PHP programmers to using those features without a lot of fuss. But you're in a much better position to say if anything I'm saying has merit.

they all do, its just that some are better than others. i dont actually like php, but it has plenty of advantages when it comes to quick web app development even without googling.

had a client once where its workers were day dreaming of a job in the valley and ofc they were using python. they bashed php on a daily basis, and as they were doing it, the php api was sole codebase running in production (essentially the company’s product) and running reliably for a few years.

the python workers were still struggling with basics such as queues and isc, and digging through non existent or vaguely written documentation. was a fun experience watching them struggle as i basically cloned repos, read the code or entry points for that code and get things shipped.

since then i started loving python. development is slower and my invoices keep coming. love it. occasionally i write some lib thats already been implemented in plenty of php and nodejs packages.

oh same client had a ruby codebase that kept failing and couldnt find devs to work on it. fun times.


Exactly.

More cogently: If PHP is where python was in 2007, why wouldn't I want to use the python of 2012?


Going from PHP to Python is great. Python feels like a huge breath of fresh air, yet it is similar enough in some respects that it isn't a huge change in the way you think.

And I'm guessing you loved Python? I'm so bored of PHP - and am finding Python really great to work with.

I am using Python since 6 months after working with PHP for many years. Guess what? I don't hate PHP.

In 2003 PHP was already the most popular web dev language and web dev was where the action was and the transition to PHP4 from PHP3 was pretty smooth. This article points out that he's got code stuck on Python 2.x, Python is not doing well on the current hotmess (mobile) and it's not now and never has been as popular as PHP. How is this similar?

Since when is PHP older than Python?

I am not saying that’s a metric of the language’s quality, nor am i saying that python is worse than php.

What i am saying is that the offering of tools has matured in php - instead of a basic template engine like smarty you now have “advanced” templating engines, packages and so on. Python has less packages but that can also he because python packages work better and there is no need for an overwhelming number of packages.

Regarding error handling that’s precisely one of the many issues with php. There are so many ways of doing the same thing that it becomes exhausting. And what many php devs do is they work around these issues either by endless hair splitting debates or a dubious amount of made up design patterns.

You shouldn't use php, i am totally against it. I think it’s as bad as it can affect your mental health. Just saying that by comparison to it’s previous versions it has come a long way.

However it does handle character encoding quite well and you can scale as much as you want to literally. Probably because thats too complex for the average php developer and it was left to core language developers which are pretty competent and experienced.


As someone who's excited to be learning Python, seeing tools like this makes me even happier. Thanks! I have a feeling going back to PHP is going to be very difficult for me :)

Before learning Python I used PHP for simple command line utilities, no complaints here.

I'm at the stage where the temptation to use PHP for something quick & dirty (a one-off script or so) is still very strong, mainly because I know all the details by heart and can pretty much realize the script as fast as I can type it in.

In python it would take me a bit more time and that time is not always available.

But the future is clear to me, no more PHP if I can help it. There are plenty of things that irritate me about python, but they are mostly things that you learn about, then it stays learned.

PHP keeps throwing up new ways to trip you up even after years of using it.

In a way I'm glad to have gone this route, in spite of the learning curve with python (and Django), I can already see it pay off when I see functions shrink to 1/3rd the size they were using PHP.

The only thing really still missing from the python under apache model is a multi threaded shared state environment.

That would really allow you to blow other solutions out of the water in terms of speed.

Now you still have to make that round trip to the database on the next page fetch.

next

Legal | privacy