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

2021-01-18 Thread tyson andre
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 features for var_export. 1. Use `null` instead of `NULL` - the former

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

2021-01-18 Thread Kamil Tekiela
What does rng stand for? Is it short for range or acronym of random number generator?

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

2021-01-18 Thread Go Kudo
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 bit-shifted unsigned 31bit number, so the results are not identical. Th

Re: [PHP-DEV] [RFC] Fibers

2021-01-18 Thread Benjamin Eberlei
On Thu, Dec 17, 2020 at 5:30 PM Aaron Piotrowski wrote: > Hello everyone! > > I would like to introduce an RFC for adding full-stack fibers to PHP: > https://wiki.php.net/rfc/fibers > > Fibers are primarily used to implement green-threads or coroutines for > asynchronous I/O. Fibers are similar t

Re: [PHP-DEV] [RFC] Allow object keys in arrays

2021-01-18 Thread Nikita Popov
On Wed, Jan 13, 2021 at 10:08 AM Rowan Tommins wrote: > On 12/01/2021 16:51, Marco Pivetta wrote: > > Whether the problem can be mitigated is what should be discussed, but the > > problem is objectively there. > > > Hi all, > > Like others, I like the *idea* of object keys, but worry about its >

Re: [PHP-DEV] Consistent type errors for internal functions and BC breaks

2021-01-18 Thread Christian Schneider
Am 16.01.2021 um 20:01 schrieb Nikita Popov : > On Sat, Jan 16, 2021 at 6:07 PM Christian Schneider > wrote: > While testing the migration of our site to PHP 8 we noticed the BC break in > internal functions like round() for parameter type errors: > round("foo") used

RE: [PHP-DEV] Addition of substring and subistring functions.

2021-01-18 Thread Adam Cable
From: Nikita Popov Sent: 18 January 2021 10:32 To: Adam Cable Cc: PHP internals Subject: Re: [PHP-DEV] Addition of substring and subistring functions. On Wed, Jan 13, 2021 at 11:51 AM Adam Cable wrote: Hi internals. I've been coding in PHP for 15 years now, and sp

Re: [PHP-DEV] Addition of substring and subistring functions.

2021-01-18 Thread Nikita Popov
On Wed, Jan 13, 2021 at 11:51 AM Adam Cable wrote: > Hi internals. > > I've been coding in PHP for 15 years now, and spend most days using it to > transform content into meaningful data. > > Most of this is pulling out prices and attributes of certain products from > HTML, for example, grabbing t