I have 2 functions, with the same variable:
$username = 1;
$username = 2;
$pineapple = fs2();
$apple = fs1();
Variables defined inside functions are available only within the function scope.
They are not accessible outside.
Check this link provided by Rizier123 to see the documentation for PHP variable scope.