+ 2
Question [SOLVED]
What does the * mean in php?
7 Réponses
+ 3
You're welcome, glad it helps : )
Would you mind to add prefix [SOLVED] to the question title? it helps others to understand the case is solved ; )
e.g. [SOLVED] Question ...
+ 5
Ah, alright, you must have meant the default argument, well, the default argument is a function's argument having a specified value; where the default value specified will be used if there is no value passed into it when the function is called.
I seem to have missed the use of * on that chapter, except if you were referring to the quiz following the explanation, where you were to fill in the blanks. There it is used to multiply the first argument with the second (which has a default value) and return the product, I hope this is what you meant.
Hth, cmiiw
+ 4
I can't answer that without enough information, it's contextual, where did you see that? if it is in the lesson mention the chapter, if it is in external source you need to post the link.
+ 3
I suppose it is a multiplication operator, like when you go
echo(5*4);
You get 20 printed on screen.
Hth, cmiiw
+ 2
sorry should have been more speicate
Counter is dealing with the * mean?
+ 2
function setCounter($num=10) {
echo "Counter is ".$num;
}
setCounter(42); //Counter is 42
setCounter(); //Counter is 10
on the lesson php define argument
+ 2
yes it was thank you!