note 125472 added to function.intval

From: Date: Thu, 29 Oct 2020 09:32:17 +0000
Subject: note 125472 added to function.intval
Groups: php.notes 
Request: Send a blank email to php-notes+get-215669@lists.php.net to get a copy of this message
https://www.php.net/manual/en/function.bcmul.php (bcmul) should be always used if you do multiply. <?php $a = 1125.84; echo intval(bcmul((string) $a, '100')); // 112584 echo (int) (bcmul((string) $a, '100')); // 112584 echo intval($a * 100); // 112583 echo (int) ($a * 100); // 112583 ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.174 (proxied: 178.235.177.231) ---- Manual Page -- http://php.net/manual/en/function.intval.php Edit -- https://master.php.net/note/edit/125472 Del: integrated -- https://master.php.net/note/delete/125472/integrated Del: useless -- https://master.php.net/note/delete/125472/useless Del: bad code -- https://master.php.net/note/delete/125472/bad+code Del: spam -- https://master.php.net/note/delete/125472/spam Del: non-english -- https://master.php.net/note/delete/125472/non-english Del: in docs -- https://master.php.net/note/delete/125472/in+docs Del: other reasons-- https://master.php.net/note/delete/125472 Reject -- https://master.php.net/note/reject/125472 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#215669) next »