News for hackers. Stuff that matters.
Re:Things You Probably Didn’t Know About PHP by lt on Tuesday January 12, 2010 @08:34AM (#1047401)
Have you ever seen better code for swapping two variables’ values !?

Actually yeah. Ways that people reading the code would recognize right away.

I'm not sure if that's intuitive for someone who codes in PHP, but if it belongs in a "PHP Tricks" article then it doesn't sound like the best way to do it.

Re:Things You Probably Didn’t Know About PHP by RyanMcGreal on Tuesday January 12, 2010 @09:40AM (#1047535)
Python:

    >>> a = 'apple'
    >>> b = 'banana'
    >>> a, b = b, a