Write a php program to swap two numbers using temporary variable

Write a php program to swap two numbers using temporary variables. This program will swap the two numbers in PHP scripting language. This program will print the result after interchanging the values in outputĀ  screen in php language

<?php 
$a = 5;
$b = 10;
$temp = $a;
$a = $b;
$b = $temp;
echo "after swapping";
echo "a =".$a." b=".$b;
?>

Output:

after a=10 b=5