note 94046 deleted from function.intval by danbrown

From: Date: Tue, 13 Oct 2009 18:33:08 +0000
Subject: note 94046 deleted from function.intval by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161700@lists.php.net to get a copy of this message
Note Submitter: vee ---- $intnum = "1.2"; echo intval($intnum);//result always down as 1 ..... $intnum = "1.2"; if(($intnum -(int)$intnum )!=0)$intnum ++; echo intval($intnum);//result always up as 2 ..... $intnum = "1.2"; if(($intnum -(int)$intnum )>=0.5)$intnum ++; echo intval($intnum);//result up to 2 if morethan 1.5 else down to 1 if lessthan 1.4 thanks to tteen.net/view.php?time=20090628141741

« previous php.notes (#161700) next »