Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-07-04 Thread Bob Weinand
> Am 5.7.2015 um 01:52 schrieb Sherif Ramadan : > On Sat, Jul 4, 2015 at 7:30 PM, Bob Weinand > wrote: > At that point it's just a bit weird. The @ operator IMO shouldn't be the > recommended way to handle fundamental operations. > > I don't think suppressing the erro

Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-07-04 Thread Aaron Piotrowski
> On Jul 4, 2015, at 6:30 PM, Bob Weinand wrote: > > >> Am 05.07.2015 um 00:50 schrieb Andrea Faulds : >> >> Hey Sherif, >> >>> On 4 Jul 2015, at 21:56, Sherif Ramadan wrote: >>> >>> I'm proposing that we reconsider removing the warning from floating point >>> division and here's why. >>>

Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-07-04 Thread S.A.N
> You ideally just check if the divisor is 0 and then do the operation. > And at that point, we should just throw the DivisionByZeroError. > > Honestly, a warning is just the wrong thing to use. Either you enable it > (like double division in C) or disable it completely (runtime exception in C). >

Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-07-04 Thread Bob Weinand
> Am 05.07.2015 um 00:50 schrieb Andrea Faulds : > > Hey Sherif, > >> On 4 Jul 2015, at 21:56, Sherif Ramadan wrote: >> >> I'm proposing that we reconsider removing the warning from floating point >> division and here's why. >> >> While IEEE 754 defines special values for floating point arit

Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-07-04 Thread Andrea Faulds
Hey Sherif, > On 4 Jul 2015, at 21:56, Sherif Ramadan wrote: > > I'm proposing that we reconsider removing the warning from floating point > division and here's why. > > While IEEE 754 defines special values for floating point arithmetic when > division by zero occurs, there's nothing stoppin

Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-07-04 Thread Bob Weinand
> Am 4.7.2015 um 23:09 schrieb Niklas Keller : > > 2015-07-04 22:56 GMT+02:00 Sherif Ramadan >: > Hey guys, > > I'm proposing that we reconsider removing the warning from floating point > division and here's why. > > While IEEE 754 defines special values for floa

Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-07-04 Thread Niklas Keller
2015-07-04 22:56 GMT+02:00 Sherif Ramadan : > Hey guys, > > I'm proposing that we reconsider removing the warning from floating point > division and here's why. > > While IEEE 754 defines special values for floating point arithmetic when > division by zero occurs, there's nothing stopping the lang

[PHP-DEV] 2x speedup for hash_pbkdf2

2015-07-04 Thread Joseph Birr-Pixton
Hi folks, I've just filed PR #1387: https://github.com/php/php-src/pull/1387 This moves invariant parts of the HMAC calculation out of the inner PBKDF2 loop. That means half the compression function applications are needed; performance is ~doubled as a result. A non-scientific comparison for do

Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-07-04 Thread Sherif Ramadan
Hey guys, I'm proposing that we reconsider removing the warning from floating point division and here's why. While IEEE 754 defines special values for floating point arithmetic when division by zero occurs, there's nothing stopping the language from providing useful error information to the user,

Re: [PHP-DEV] [RFC] Additional soft-reservations for PHP 7

2015-07-04 Thread Nikita Popov
On Sat, Jul 4, 2015 at 9:31 AM, Trevor Suarez wrote: > > On Fri, Jul 3, 2015 at 12:24 PM Nikita Popov wrote: > >> Hi internals! >> >> In a previous thread on the topic [1] I promised to create an RFC for the >> soft-reservation of 'void', similar to a bunch of other reservations we >> have done

Re: [PHP-DEV] [RFC] Additional soft-reservations for PHP 7

2015-07-04 Thread Trevor Suarez
On Fri, Jul 3, 2015 at 12:24 PM Nikita Popov wrote: > Hi internals! > > In a previous thread on the topic [1] I promised to create an RFC for the > soft-reservation of 'void', similar to a bunch of other reservations we > have done for PHP 7. The RFC also includes 'enum' as an additional > indepe