if not, then how to declare a double type of number?
function testFloat(float $f)
{
return $f;
}
echo testFloat(1.2);
Catchable fatal error: Argument 1 passed to testFloat() must be an instance of float, double given
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Update:
Regarding type hinting:
So I don’t know, but probably you get the error because only
arrayandobjecttypes are supported.I am not exactly sure what you want, but there is only
float:and there you find also: