Contact: aviboots(AT)netvision.net.il
41,230 questions
53,732 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 */