PHP Snippets
Sometimes you need to swap two variables quickly, and at some point I wondered whether that's possible without a temp variable. Since then this has been my best practice: [$x, $y] = [$y, $x]
Sometimes you need to swap two variables quickly, and at some point I wondered whether that's possible without a temp variable. Since then this has been my best practice: [$x, $y] = [$y, $x]