The parameter of the is_numeric() function is a number or a numeric string. Your parameter '18.8' is a numeric string and meets the conditions, so it returns "true";
What you want to test is '18.8', you should use: is_float() function to test. If you want to test integer, please use is_int()
The parameter of the is_numeric() function is a number or a numeric string. Your parameter '18.8' is a numeric string and meets the conditions, so it returns "true";
What you want to test is '18.8', you should use: is_float() function to test. If you want to test integer, please use is_int()
More usage, Can parameter PHP User Manual