Tools, FAQ, Tutorials:
Passing an Argument to a Function in PHP
How To Pass an Argument to a Function? in PHP?
✍: FYIcenter.com
To pass an argument to a function, you need to:
Here is a PHP script on how to use arguments in a function():
<?php
function f2c($f) {
return ($f - 32.0)/1.8;
}
print("Celsius: ".f2c(100.0)."\n");
print("Celsius: ".f2c(-40.0)."\n");
?>
This script will print:
Celsius: 37.777777777778 Celsius: -40
⇒ Variables Are Passed by Values in PHP
⇐ Returning a Value from a Function in PHP
2016-12-24, ∼2759🔥, 0💬
Popular Posts:
What is the "__init__()" class method? The "__init__()" class method is a special method that will b...
How to use the "@{...}" expression block in Azure API Policy? The "@{...}" expression block in Azure...
How To Create an Array with a Sequence of Integers or Characters in PHP? The quickest way to create ...
How to add request URL Template Parameters to my Azure API operation to make it more user friendly? ...
How to run PowerShell Commands in Dockerfile to change Windows Docker images? When building a new Wi...