Contact: aviboots(AT)netvision.net.il
41,604 questions
54,252 answers
573 users
$str = "-24"; $n = (int)$str; echo $n < 0 ? "yes" : "no"; /* run: yes */
$str = "-24"; $n = (int)$str; if (is_int($n) && $n < 0 ) { echo "yes"; } else { echo "no"; } /* run: yes */