Re: [PHP-DEV] Re: [RFC] Under Discussion: Add Random class and RandomNumberGenerator interface

2021-06-12 Thread Go Kudo
Sorry, I'm late to reply. > How much more "costly" would it be to define a class (implementing RandomNumberGenerator) and use its (full) name as the algo identifier? If the Random class always accepts an instance of the RandomNumberGenerator, it will be necessary to provide a class that

[PHP-DEV] [RFC] is_literal

2021-06-12 Thread Craig Francis
Hi Internals, I'd like to start the discussion on the is_literal() RFC: https://wiki.php.net/rfc/is_literal is_literal() brings a proven way to identify Injection Vulnerabilities to PHP, already used by Google in their Java and Go projects, and is currently being added to JavaScript. It's a

Re: [PHP-DEV] [RFC] is_literal

2021-06-12 Thread Joe Watkins
Afternoon all, While this is not at all my idea, I wrote the patch, so my words may seem bias/hollow. Still, here are some words ... In the past this kind of feature would have been extremely invasive, it would have had so many edges because of the way we handled strings that it was never really

Re: [PHP-DEV] Re: RFC: CachedIterable (rewindable, allows any key keys)

2021-06-12 Thread tyson andre
Hi internals, > > > So I'm probably changing this to `ImmutableTraversable` as a short name > > > for the functionality, > > > to make it clear arguments are eagerly evaluated when it is created. > > > (ImmutableSequence may be expected to only contain values, and would be > > > confused with

Re: [PHP-DEV] [RFC] is_literal

2021-06-12 Thread Craig Francis
On Sat, 12 Jun 2021 at 19:59, Lauri Kenttä wrote: > Hi, > > I wrote the untaint() / make_literal() function, just in case. > > implode("", array_map(fn($c) => $chars[ord($c)], str_split($s, 1))) > > https://3v4l.org/EaN9Z#focus=rfc.literals > > Sorry and bye. > > Yes, I have a similar example

Re: [PHP-DEV] [RFC] is_literal

2021-06-12 Thread Lauri Kenttä
Hi, I wrote the untaint() / make_literal() function, just in case. implode("", array_map(fn($c) => $chars[ord($c)], str_split($s, 1))) https://3v4l.org/EaN9Z#focus=rfc.literals Sorry and bye. -- Lauri Kenttä -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] [RFC] is_literal

2021-06-12 Thread Lauri Kenttä
On 2021-06-12 22:21, Craig Francis wrote: On Sat, 12 Jun 2021 at 19:59, Lauri Kenttä wrote: Hi, I wrote the untaint() / make_literal() function, just in case. implode("", array_map(fn($c) => $chars[ord($c)], str_split($s, 1))) https://3v4l.org/EaN9Z#focus=rfc.literals Sorry and bye.