Skip to content

Instantly share code, notes, and snippets.

Created August 22, 2012 20:08
<?php
a=10;
b=20;
a= a+b; // a has 30; 20+10
b=a-b; // b has 10; (30-20)
a=a-b; // a has 20(30-10) //
// values are swapped now !!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment