>>436
($num + 0) == $num ? "numeric" : "string";

これでいんじゃね?