PHP - Functions
Identify the error in this PHP function declaration:
function setName(?string name) {
echo $name;
}function setName(?string name) {
echo $name;
}$. The parameter name is missing $.?string are valid. The function does not require a return value. Parameters can be nullable without default values.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions