I’m wondering if I can write is_numeric($action) someway like this:
switch ($action):
case NULL:
...
CASE INTEGER: is not working.
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.
I am assuming you want to do a type switch on an input value.
Theoretically you cannot use
gettypedue to the giant red warning:Just between you and me, I expect it will work for at least a decade or so. But it makes you feel dirty, it’s true.
In the quest for something officially supported, we might turn to this: