I've seen blog posts about moving away from PHP to Python, Ruby, and other better languages but not much about the opposite direction. Have you been in a similar situation and if so how did you manage to adapt and maintain your sanity ? Any suggestions, warnings or pointers on learning the good parts of PHP (if there are any) for advanced programmers would be most helpful.
Ask HN: PHP for Python programmers
1–10 of 77 posts
Re: Ask HN: PHP for Python programmers
#2Re: Ask HN: PHP for Python programmers
#3It's true that everything gets shoveled into one big namespace, but PHP lets you get a lot done with very little bull. There's a lot of crappy PHP out there, but there's a lot of crappy Java, Python, Ruby and C# too. If you approach PHP with some discipline I think you'll find it's an environment that never kills you with a showstopper flaw.
Re: Ask HN: PHP for Python programmers
#4Re: Ask HN: PHP for Python programmers
#5not that I've written any python, but is PHP that much low level?
Re: Ask HN: PHP for Python programmers
#6Re: Ask HN: PHP for Python programmers
#7The team that makes PHP makes quality a higher priority than just about any other language; if something is built into PHP, it's pretty likely to work correctly. (For example, PHP and Python have the exact same problems with threads, and the PHP team says "don't use PHP in a threaded environment" and the the Python people say "come jump in the water is fine") It's true that everything gets shoveled into one big names…
Re: Ask HN: PHP for Python programmers
#8Don't worry about it. I was in a similar position a few months ago when I, a python programmer, was offered a perl position. Eventually you just get used to it, and you might even find things you like. I've stopped being as much of a language snob. Some features and most syntax are just decorative, and you'll adjust. The whole giant namespace thing would bother me a lot, but hey its worked for other people before.
Nice to see that learning a 'crappy' language like PHP got you on to a more even keel in that respect.
Re: Ask HN: PHP for Python programmers
#9Don't worry about it. I was in a similar position a few months ago when I, a python programmer, was offered a perl position. Eventually you just get used to it, and you might even find things you like. I've stopped being as much of a language snob. Some features and most syntax are just decorative, and you'll adjust. The whole giant namespace thing would bother me a lot, but hey its worked for other people before.
PHP does have problems, but it's easy to pick up. I don't know that learning it will make you a better programmer, but a good programmer can definitely make it solve problems efficiently enough.
Re: Ask HN: PHP for Python programmers
#10The team that makes PHP makes quality a higher priority than just about any other language; if something is built into PHP, it's pretty likely to work correctly. (For example, PHP and Python have the exact same problems with threads, and the PHP team says "don't use PHP in a threaded environment" and the the Python people say "come jump in the water is fine") It's true that everything gets shoveled into one big names…
Seriously? Don't get me wrong, I could imagine valid reasons to use PHP. But the quality of the language itself is at the very bottom of that list. I don't usually hear PHP advocates making that case. Usually it's a combination of "the language isn't that bad" and "there are a lot of libraries for PHP".
But it's been absolutely bullet proof in production for me and when I did find a bug I've had a patch within 24 hours straight from the core devs.
They do take quality serious there, they just don't define it as language elegance.