[PHP-DEV] [VOTE] Dump results of expressions in `php -a`

2021-01-19 Thread tyson andre
Hi internals, Voting has started on https://wiki.php.net/rfc/readline_interactive_shell_result_function on 2021-01-19, and ends on 2021-02-02. This RFC proposes to dump the results of non-null expressions using var_dump/var_export() by default in `php -a` (the interactive shell). Additionally,

[PHP-DEV] [VOTE] Straw poll: Using namespaces for *any() and *all() on iterables

2021-01-19 Thread tyson andre
Hi internals, I've started voting on  https://wiki.php.net/rfc/any_all_on_iterable_straw_poll_namespace  Voting starts on 2021-01-19 and ends on 2021-02-02. This is an 11-way Single Transferable Vote poll on the choice of namespace, to ensure that all proposed namespaces (and similar

Re: [PHP-DEV] Re: [RFC] Object-scope RNG implementation

2021-01-19 Thread Go Kudo
> but I don't think rng_rand() should support calling without arguments. This is a backwards-compatibility leftover in mt_rand() and we should not carry it over into a new API. While this is true, the current implementation of MT in PHP relies on global state, and I believe that having a

Re: [PHP-DEV] Proposal: short_var_export($value, bool $return=false, int $flags=0)

2021-01-19 Thread Pierre R.
Le 19/01/2021 à 16:12, tyson andre a écrit : It seems inconsistent and prone to bugs when refactoring (e.g. converting to string and not using the result) to have two functions named var_export where one prints by default and the other doesn't, but otherwise . Changing to a different name

Re: [PHP-DEV] Re: [RFC] Object-scope RNG implementation

2021-01-19 Thread Marc Bennewitz
Am 19.01.21, 17:20 schrieb "Nikita Popov" : * 64-bit: I looked over your implementation, and I think your approach to handling 64-bits is correct. You only call next64() if the requested range is larger than 32-bit, and that can only happen on 64-bit systems, thus guaranteeing

Re: [PHP-DEV] Re: [RFC] Object-scope RNG implementation

2021-01-19 Thread Go Kudo
Yes. RNG stands for Random Number Generator, which I think is a common acronym. Cryptographic pseudo-random number generators are commonly known as a CSPRNG. 2021年1月19日(火) 1:42 Kamil Tekiela : > What does rng stand for? Is it short for range or acronym of random number > generator? >

Re: [PHP-DEV] Re: [RFC] Object-scope RNG implementation

2021-01-19 Thread Nikita Popov
On Mon, Jan 18, 2021 at 5:29 PM Go Kudo wrote: > RFC and implementation updated. > > https://wiki.php.net/rfc/object_scope_prng > https://github.com/php/php-src/pull/6568 > > > MT19937 returns a signed 32bit number as a result of the `next()` method; > the mt_rand() function returns a

Re: [PHP-DEV] Proposal: short_var_export($value, bool $return=false, int $flags=0)

2021-01-19 Thread tyson andre
Hi Nikita, > The formatting of var_export is certainly a recurring complaint, and previous > discussions were not particularly open to changing current var_export > behavior, so adding a new function seems to be the way to address the issue > (the alternative would be to add a flag to

Re: [PHP-DEV] Proposal: short_var_export($value, bool $return=false, int $flags=0)

2021-01-19 Thread Benjamin Morel
> Hi Tyson, > > The formatting of var_export is certainly a recurring complaint, and > previous discussions were not particularly open to changing current > var_export behavior, so adding a new function seems to be the way to > address the issue (the alternative would be to add a flag to

Re: [PHP-DEV] Proposal: short_var_export($value, bool $return=false, int $flags=0)

2021-01-19 Thread Nikita Popov
On Mon, Jan 18, 2021 at 10:12 PM tyson andre wrote: > Hi internals, > > I've created a PR https://github.com/php/php-src/pull/6619 to add an > alternative to var_export(). > The proposed short_var_export() also outputs/returns a parseable > representation of a variable, > but adds requested