Program to swap two numbers without using a third variable.


$x = 2;
$y = 3;
echo "X = ".$x;
echo "Y =".$y;

$x = $x + $y;
$y = $x - $y;
$x = $x - $y;

echo "X = ".$x;
echo "Y =".$y;

//OutPut : 
X = 3
Y = 2