note 124313 added to function.intdiv
| From: | sree dot millu at gmail dot com | Date: | Sun, 20 Oct 2019 15:01:10 +0000 |
| Subject: | note 124313 added to function.intdiv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-212736@lists.php.net to get a copy of this message | ||
@AmeenRoss
This does NOT seem to be equal to intdiv:
<?php
function intdiv_1($a, $b){
return ($a - $a % $b) / $b;
}
?>
See this example code
<?php
$x = 5.6;
$y = 1.4 ;
echo intdiv($x,$y);
echo "\n";
function intdiv_1($a, $b){
return ($a - $a % $b) / $b;
}
echo intdiv_1($x,$y);
?>
//Output
5
4
----
Server IP: 208.43.231.9
Probable Submitter: 195.138.250.34 (proxied: 2409:4071:240f:f791:d9:b212:2864:2fc6)
----
Manual Page -- http://php.net/manual/en/function.intdiv.php
Edit -- https://master.php.net/note/edit/124313
Del: integrated -- https://master.php.net/note/delete/124313/integrated
Del: useless -- https://master.php.net/note/delete/124313/useless
Del: bad code -- https://master.php.net/note/delete/124313/bad+code
Del: spam -- https://master.php.net/note/delete/124313/spam
Del: non-english -- https://master.php.net/note/delete/124313/non-english
Del: in docs -- https://master.php.net/note/delete/124313/in+docs
Del: other reasons-- https://master.php.net/note/delete/124313
Reject -- https://master.php.net/note/reject/124313
Search -- https://master.php.net/manage/user-notes.php