Re: [PHP-DEV] Adding validate_var_array()/validate_input_array() towhich version?

2016-08-06 Thread Yasuo Ohgaki
On Sat, Aug 6, 2016 at 6:36 AM, Yasuo Ohgaki wrote: > > assert_require_*() I mean filter_require_*(), of course... Anyway, I think I finished proposed implementation. I would like to start the vote from 8/10. If you have any concerns, please let me know. https://wiki.php.net/rfc/add_validate_fu

Re: [PHP-DEV] Change to Too Few Args Exception RFC

2016-08-06 Thread Davey Shafik
AFAICT, to make this change, I'd have to modify: ZEND_API ZEND_COLD void zend_internal_type_error(zend_bool throw_exception, const char *format, ...) /* {{{ */ To be: ZEND_API ZEND_COLD void zend_internal_type_error(zend_bool throw_exception, zend_class_entry *zend_error, const char *format, …)

Re: [PHP-DEV] Re: [RFC][DISCUSSION] Argon2 Password Hash

2016-08-06 Thread Charles R. Portwood II
On Sat, Aug 6, 2016 at 11:37 AM, Lauri Kenttä wrote: > On 2016-08-06 17:47, Charles R. Portwood II wrote: > >> Absolutely. What are your thoughts on the following cost factors? >> >> time_cost = 3 >> memory_cost = 12 >> threads = 1 >> >> The reference library provides a CLI program where these va

Re: [PHP-DEV] Re: [RFC][DISCUSSION] Argon2 Password Hash

2016-08-06 Thread Tom Worster
On 8/5/16, 2:20 PM, "Charles R. Portwood II" wrote: >It breaks the API in the interim between this RFC and a potential future >one. The $options parameter for both password_hash and >password_needs_rehash is optional. Making it required for one algorithm >but not another changes the API's for bot

Re: [PHP-DEV] Re: [RFC][DISCUSSION] Argon2 Password Hash

2016-08-06 Thread Lauri Kenttä
On 2016-08-06 17:47, Charles R. Portwood II wrote: Absolutely. What are your thoughts on the following cost factors? time_cost = 3 memory_cost = 12 threads = 1 The reference library provides a CLI program where these values are listed. A memory_cost factor of 12 would be 4 MiB. Looks like the

Re: [PHP-DEV] Re: [RFC][DISCUSSION] Argon2 Password Hash

2016-08-06 Thread Charles R. Portwood II
On Sat, Aug 6, 2016 at 6:09 AM, Niklas Keller wrote: > 2016-08-05 22:51 GMT+02:00 Lauri Kenttä : > >> On 2016-08-05 21:20, Charles R. Portwood II wrote: >> >>> On Fri, Aug 5, 2016 at 12:12 PM, Tom Worster wrote: >>> I can understand an argument that it's too much to expect a user to >>

Re: [PHP-DEV] More packed hash optimizations in array.c

2016-08-06 Thread Benjamin Coutu
Hi Xinchen, There is still a way we could make this work, if we'd simply check for nNumUsed == nNumOfElements as well. Because a packed array with nNumUsed equal to nNumOfElements must be consecutively indexed from zero onward without any gaps (no IS_UNDEF). I therefore propose to change array

RE: [PHP-DEV] Change to Too Few Args Exception RFC

2016-08-06 Thread Thomas Punt
Hi! > From: m...@kelunik.com> > I don't like "ArgumentError", how about "WrongArgumentCountError"? Maybe > also "WrongArgumentsError". I'd favour simply ArgumentCountError. No need to prepend a "wrong" to theerror class name - we can already guess it's wrong because it has resulted inan error :

Re: [PHP-DEV] Re: [RFC][DISCUSSION] Argon2 Password Hash

2016-08-06 Thread Niklas Keller
2016-08-05 22:51 GMT+02:00 Lauri Kenttä : > On 2016-08-05 21:20, Charles R. Portwood II wrote: > >> On Fri, Aug 5, 2016 at 12:12 PM, Tom Worster wrote: >> >>> >>> I can understand an argument that it's too much to expect a user to >>> provide an options array when using Argon2. But I don't unders

Re: [PHP-DEV] Change to Too Few Args Exception RFC

2016-08-06 Thread Nikita Popov
On Sat, Aug 6, 2016 at 11:53 AM, Davey Shafik wrote: > On Sat, Aug 6, 2016 at 2:34 AM, Nikita Popov wrote: > >> On Sat, Aug 6, 2016 at 4:26 AM, Davey Shafik wrote: >> >>> Hey all, >>> >>> I know this is a little late in the process, but it's something I've >>> noticed while prepping some conten

Re: [PHP-DEV] Change to Too Few Args Exception RFC

2016-08-06 Thread Niklas Keller
2016-08-06 11:53 GMT+02:00 Davey Shafik : > On Sat, Aug 6, 2016 at 2:34 AM, Nikita Popov wrote: > > > On Sat, Aug 6, 2016 at 4:26 AM, Davey Shafik wrote: > > > >> Hey all, > >> > >> I know this is a little late in the process, but it's something I've > >> noticed while prepping some content arou

Re: [PHP-DEV] Change to Too Few Args Exception RFC

2016-08-06 Thread Davey Shafik
On Sat, Aug 6, 2016 at 2:34 AM, Nikita Popov wrote: > On Sat, Aug 6, 2016 at 4:26 AM, Davey Shafik wrote: > >> Hey all, >> >> I know this is a little late in the process, but it's something I've >> noticed while prepping some content around 7.1. >> >> This RFC: https://wiki.php.net/rfc/too_few_a

Re: [PHP-DEV] Change to Too Few Args Exception RFC

2016-08-06 Thread Nikita Popov
On Sat, Aug 6, 2016 at 4:26 AM, Davey Shafik wrote: > Hey all, > > I know this is a little late in the process, but it's something I've > noticed while prepping some content around 7.1. > > This RFC: https://wiki.php.net/rfc/too_few_args > > Passed, and has been implemented, but I feel that throw

Re: [PHP-DEV] Re: Change to Too Few Args Exception RFC

2016-08-06 Thread Davey Shafik
Dmitry, I've tried to implement this myself, and it seems to work fine, but I end up with some weird (unrelated?) test failures after: https://github.com/php/php-src/compare/master...dshafik:too-few-args-exception Example test failure: DIFF 001+ Warning: file_get_contents(http:/

Re: [PHP-DEV] Re: Change to Too Few Args Exception RFC

2016-08-06 Thread Joe Watkins
Morning all, Good idea, +1 for just doing it ... Cheers Joe On Sat, Aug 6, 2016 at 8:18 AM, Dmitry Stogov wrote: > I don't see a big problem accepting this. The change is really minor, and > makes sense. > > Dmitry. > > On Aug 6, 2016 5:26 AM, Davey Shafik wrote: > Hey all, > > I know this

[PHP-DEV] Re: Change to Too Few Args Exception RFC

2016-08-06 Thread Dmitry Stogov
I don't see a big problem accepting this. The change is really minor, and makes sense. Dmitry. On Aug 6, 2016 5:26 AM, Davey Shafik wrote: Hey all, I know this is a little late in the process, but it's something I've noticed while prepping some content around 7.1. This RFC: https://wiki.php.