Re: [PHP-DEV] Re: Improving mt_rand() seed

2017-01-27 Thread Yasuo Ohgaki
Hi all, On Wed, Jan 18, 2017 at 3:04 PM, Yasuo Ohgaki wrote: > The patch initializes the full MT state vector, approximately 2.5KB of >> memory, from a CSPRNG. To put this into perspective, 16 bytes are generally >> considered to be sufficient for cryptographic keying

[PHP-DEV] Allow "static" type

2017-01-27 Thread Marc Bennewitz
Hi all, I would like to know your opinion about using "static" as type-hint similar to "self" and how simple / complex it would be to implement. Example - using static: https://3v4l.org/XqDma class Base { public static function test(static $obj) : static { echo get_class($obj) .

Re: [PHP-DEV] [RFC] libsodium (PHP 7.2)

2017-01-27 Thread Scott Arciszewski
On Tue, Jan 17, 2017 at 5:49 AM, Scott Arciszewski wrote: > On Thu, Jan 12, 2017 at 5:23 AM, Julien Pauli wrote: > >> On Wed, Jan 11, 2017 at 7:22 PM, Scott Arciszewski >> wrote: >> >>> Hi all, >>> >>> I'm resurrecting my RFC to add

[PHP-DEV] BAD Benchmark Results for PHP Master 2017-01-26

2017-01-27 Thread lp_benchmark_robot
Results for project PHP master, build date 2017-01-26 20:28:43-08:00 commit: 68801c9 previous commit:b8f1c79 revision date: 2017-01-26 11:36:50+00:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

[PHP-DEV] Re: internals Digest 27 Jan 2017 10:58:15 -0000 Issue 4425

2017-01-27 Thread Tom Worster
On 27 Jan 2017, at 5:58, internals-digest-h...@lists.php.net wrote: One would like to think so but low entropy environments exist. The problem may even be getting more widespread as embedded systems become more widespread. Could you tell us which platforms could have problem with CSPRNG

Re: [PHP-DEV] [RFC][VOTE] Trailing commas in all list syntax

2017-01-27 Thread Nikita Popov
On Fri, Jan 27, 2017 at 5:05 PM, Sammy Kaye Powers wrote: > Hello my internals friends! > > After a 2 week (ahem... 1 year & 3 month - sorry for dropping the > ball) discussion period, the "Trailing commas in all list syntax" RFC > is now open for voting. > > See the discussion

Re: [PHP-DEV][RFC][VOTE] Throwable error code's type generalization

2017-01-27 Thread Wes
Closing this. Thanks to the voters! Markus: sorry if i didn't answer, i didn't get the notification. I realize now it wasn't really clear. Patch would've changed Error and Exception constructors only, from int to "mixed". And someone else would have had to write it, because I have no internals

Re: [PHP-DEV] [RFC][VOTE] Trailing commas in all list syntax

2017-01-27 Thread Wes
Can I apologize already for the imminent failure? :P I think it's very much ok on parameters and especially arguments. I don't really care about the others. 2017-01-27 17:05 GMT+01:00 Sammy Kaye Powers : > Hello my internals friends! > > After a 2 week (ahem... 1 year & 3 month -

Re: [PHP-DEV] Re: Improving mt_rand() seed

2017-01-27 Thread Lauri Kenttä
On 2017-01-27 17:13, Leigh wrote: On 27 January 2017 at 14:30, Lauri Kenttä wrote: This needs to be thought of as 2^32 possible _streams_ with a period of (2^19937)−1. Offset within the stream is as important as the stream variation itself. This is not true. There

[PHP-DEV] [RFC][VOTE] Trailing commas in all list syntax

2017-01-27 Thread Sammy Kaye Powers
Hello my internals friends! After a 2 week (ahem... 1 year & 3 month - sorry for dropping the ball) discussion period, the "Trailing commas in all list syntax" RFC is now open for voting. See the discussion here: https://www.mail-archive.com/internals@lists.php.net/msg81366.html You can vote

Re: [PHP-DEV] Not autoloading functions

2017-01-27 Thread Wes
Importing functions from a static class would equally require to have all functions in the same file. I was proposing an alternative to that, not "symbol to file" autoloading. Though, I know that problem well, sadly. I've suggested PHP should just deprecate the fallback to root namespace, and

Re: [PHP-DEV] Re: Improving mt_rand() seed

2017-01-27 Thread Leigh
On 27 January 2017 at 14:30, Lauri Kenttä wrote: >> This needs to be thought of as 2^32 possible _streams_ with a period >> of (2^19937)−1. Offset within the stream is as important as the stream >> variation itself. > > This is not true. There is one stream of period

Re: [PHP-DEV] Not autoloading functions

2017-01-27 Thread Nikita Nefedov
On Fri, 20 Jan 2017 10:04:44 +0300, Rasmus Schultz wrote: Just a quick thought. Since the autoloading functions proposal is stalled, how about allowing for import of static functions instead? use function Foo::bar; bar(); // calls Foo::bar() There are two

Re: [PHP-DEV] Re: Improving mt_rand() seed

2017-01-27 Thread Lauri Kenttä
On 2017-01-27 12:58, Leigh wrote: On 27 January 2017 at 02:52, Yasuo Ohgaki wrote: Since mt_rand is predictable PRNG, there is possibility to be known to attackers always. What I would like to change is - there is only 2^32 initial states This needs to be thought of as

Re: [PHP-DEV] Not autoloading functions

2017-01-27 Thread Rowan Collins
On 27 January 2017 09:23:38 GMT+00:00, Wes wrote: >An alternative (which I haven't properly developed yet). Thoughts? >\A\B\someFunction(); >// prints: >// LOADING A\n >// LOADING AB\n As I understand it, PHP namespaces aren't really hierarchies, they just have a

Re: [PHP-DEV] Re: Improving mt_rand() seed

2017-01-27 Thread Leigh
On 27 January 2017 at 02:52, Yasuo Ohgaki wrote: > Since mt_rand is predictable PRNG, there is possibility to be known to > attackers always. > > What I would like to change is > > - there is only 2^32 initial states This needs to be thought of as 2^32 possible _streams_

Re: [PHP-DEV] Not autoloading functions

2017-01-27 Thread Wes
An alternative (which I haven't properly developed yet). Thoughts? ``` define_autoload(AUTOLOAD_NS, function($ns){ if($ns === '\A\B\C'){ echo "LOADING ABC\n"; require(__DIR__ . $ns . '\functions_and_constants.php'); } }); define_autoload(AUTOLOAD_NS, function($ns){