QUIZGUM

Coding Class

Quizgum : parameter and argument

Parameters and Arguments

Let's look at the parameters and arguments.
It's a description of the name and it's a separate page because you've seen a lot of what people don't distinguish between the two and just call it a parameter.
People who have more than 15 years of experience have seen many call them parameters.

Parameter means a variable to which data is assigned in a function.
Consider the following code.

Parameter

function sum($num,$num2){
}

In the code above I'm declaring a function called sum.
Looking at the function, $num and $num2 are the parameters.
Here is the argument:

Argument

function sum($num,$num2){
}

sum(5,10);

Looking at the code above, there is a partial sum(5,10) that calls a function. Passing 5 and 10. This value is called an argument.
Now, we learned about parameters and arguments.