make money free online
star business online
12:09 AM

Function Parameters

Posted by Business

still about variable this time online business to explain about Function Parameters.

As is the case with many other programming languages, in PHP any function that accepts arguments must declare these arguments in the function header.

Although these arguments accept values that come from outside of the function, they are no longer accessible once the function has exited. Function parameters are declared after the function name and inside parentheses.They are declared much like a typical variable would be:

// multiply a value by 10 and return it to the caller
function x10 ($value) {

$value = $value * 10;

return $value;

}

It is important to realize that although you can access and manipulate any function
parameter in the function in which it is declared, it is destroyed when the function
execution ends.

0 comments:

Post a Comment