note 7932 added to Operators
| From: | kt_yong at mailcityasia dot com | Date: | Mon, 21 Aug 2000 04:01:46 +0000 |
| Subject: | note 7932 added to Operators | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2815@lists.php.net to get a copy of this message | ||
Example 1 is how I do my cast to integer.
Example 1 works but not the 2nd Example neither the 3th
Example 1:
$quo=(int) div($num, $num2);
function div($a, $b) {
return $a/$b;
}
Example 2:
$quo = div($num, $num2);
function($a, $b) {
return (int) $a/$b;
}
Example 3:
$quo= (int) $num/num2;
http://www.php.net/manual/language.operators.php