News for hackers. Stuff that matters.
Re:Ask HN: PHP for Python programmers by photon_off on Saturday September 11, 2010 @08:57PM (#1682760)
Switching languages, for me, has usually been a matter of remembering syntax, some minor differences (such as how arrays work, what things are built-in, etc), and the patterns in each language that naturally arise from those two. Of course, things get more complicated if the language itself is structured differently (eg: Javascript), but there are a lot of underlying concepts that carry over (scope, stack, OOP, etc). In short, it just takes practice. If you're "advanced", you should be able to pick up on it pretty quickly.

To get a feel for syntax and how PHP works (especially == and reference/value), you should read the docs. They're a breeze and provide lots and lots of examples. The user comments are generally incredibly helpful and will notify you of caveats that you might need to be aware of.

You'll also want to start off by learning how to build objects in PHP, how associative arrays work (they are great), and how to use __autoload() to include classes on the fly.

Re:Ask HN: PHP for Python programmers by cheald on Saturday September 11, 2010 @08:58PM (#1682762)
Magic quotes is also worth a mention. It's bound to throw anyone coming from another language for a loop.
Re:Ask HN: PHP for Python programmers by photon_off on Saturday September 11, 2010 @09:01PM (#1682769)
Magic quotes has been disabled by default for several years. All you need to know about them are: disable them if enabled.
Re:Ask HN: PHP for Python programmers by duskwuff on Saturday September 11, 2010 @10:47PM (#1682913)
And if you can't guarantee they're disabled (e.g, if you're writing code to be used by other people), undo them at runtime as early as possible.