What would be the best (most efficient, easiest to understand in code, etc.) way to check if a variable has a primitive type in PHP?
Should I go "positive" (for example, is_string() || is_int()...) , or vice versa !is_array() && __is_object().. or maybe some even more convenient way?
Aurimas
source share