On Mon, Jul 14, 2014 at 10:17 PM, Stas Malyshev <smalys...@sugarcrm.com>
wrote:

> Hi!
>
> > Both of those are likely not to be installed on most systems. Why do
>
> Why not? bcmath is in core since forever and has no external
> requirements, gmp builds practically everywhere too. AFAIR all distros
> have it.
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
While a practical argument can certainly be made that existing solutions
can fit the examples OP cited, I don't think that takes away from the
underlying principle of the argument:  That there's no reason *not* to
include a basic integer division in PHP.  It's never made sense to me why
it wasn't included.  Rather than an intdiv() function, though, I wonder if
an operator would be a better approach.  Some languages I've seen that use
/ as the division operator will use a \ as the integer division operator.

--Kris

Reply via email to