note 41217 deleted from function.intval by vrana

From: Date: Tue, 15 Mar 2005 13:54:07 +0000
Subject: note 41217 deleted from function.intval by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-86471@lists.php.net to get a copy of this message
Note Submitter: paul at SPAMFREEMAN dot santasoft dot com ---- OOpsie-doopsie, forgot the meat and potatoes.. in that example below, <?php $num = pi(); echo (int) ($num * 10); // prints 31, not 30 ?> Note that this does the same thing and returns 31 as desired: <?php $num = pi(); echo intval($num * 10); // prints 31, not 30 ?> So intval is a good thing in certain circumstances.

« previous php.notes (#86471) next »