Code:
<?php
/*
variable scope in php
local variable
global variable
static variable
function parameter
*/
$x = 10;
function xyz(){
$x = 15;
print "The value of x inside function is: $x<br />";
}
xyz();
print "The value of x outside function is: $x";
?>
Comments
Post a Comment