Inside the function || Operation outside the function

<?php
function example( $m ){ //Define a function
$m = $m * 5 + 10;
echo "Inside the function: \$m = ".$m; //Output the value of the parameter
}
$m = 1;
example( $m ) ; //Pass value: pass the value of $m to the formal parameter $m
echo "<p>Outside the function:\$m = $m <p>" ; //The actual parameter The value has not changed, output m=1
?>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324955023&siteId=291194637