> On July 17, 2014 at 3:17 AM Sara Golemon <poll...@php.net> wrote: > > All that said, *I* think the tradeoff of an extra idivq in the > (probably more common) remainder case is worth it in the interest > keeping PHP's syntax simple.
What are you suggesting you do for an integer division, then? ($a - ($a % $b)) / $ b? The division operator already returns an integer. Or should I just use intdiv()? > If we're really set on adding a new operator, I'd vote for something > which provides dividend *and* remainder in some way. (Useful for time > arithmetic, for example) Isn't that the division operator? ;) In all seriousness, you could just have the compiler optimise using % and %% successively with the same operands to just be a single division, if that's possible. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php