Re: [PHP-DEV] [RFC] [Discussion] Deprecate GET/POST sessions

2024-03-04 Thread Anton Smirnov
On 03/03/2024 23:33, Kamil Tekiela wrote: > Hi Anton, > >> As I know some session-related middlewares force custom-only session_id >> handling by setting >> >> use_cookies = Off >> use_only_cookies = On >> >> and then using session_id(...) directly >> >> Example: >>

Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading

2023-04-12 Thread Anton Smirnov
On Tue, 2023-04-11 at 11:57 +0100, G. P. B. wrote: > No, array_map will trigger the autoloader (actually strlen() will > trigger it once first) and the autoloader should then load the > array_map function from the My namespace. > However, if the autoloader does not correctly load the

Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading

2023-04-10 Thread Anton Smirnov
Hello George, I'm not sure I'm 100% correct but I think that this RFC still allows to call different functions for the same code, just not in the same run. Consider this pseudocode: //- funcs.php namespace My; function myfunc(...) { ... } function array_map(...) { ... } //- code1.php

Re: [PHP-DEV] xoshiro** edge case (all zeros)

2022-08-04 Thread Anton Smirnov
choose to seed the RNG with 0x...0001 but that kinda inroduces bias > On Thu, 4 Aug 2022 at 20:33, Tim Düsterhus wrote: > > Hi > > > > On 8/4/22 10:09, Anton Smirnov wrote: > > > xoshiro** has a known edge case: all-zero seed > > > > Indeed,

[PHP-DEV] xoshiro** edge case (all zeros)

2022-08-04 Thread Anton Smirnov
Hi! Randomness again. Sorry if I just missed some relevant discussion xoshiro** has a known edge case: all-zero seed generate()), PHP_EOL; // } It should be documented and/or handled It's only for a string seed, int seed is not affected -- Anton -- PHP Internals - PHP

Re: [PHP-DEV] Negative values in PcgOneseq128XslRr64::jump($advance)

2022-07-31 Thread Anton Smirnov
On Sun, 2022-07-31 at 19:52 +0200, Tim Düsterhus wrote: > Hi > > On 7/31/22 17:50, Anton Smirnov wrote: > > I'm writing a polyfill for ext-random and I noticed a small > > weirdness. > > PcgOneseq128XslRr64::jump() accepts negative $advance where it > > automa

[PHP-DEV] Negative values in PcgOneseq128XslRr64::jump($advance)

2022-07-31 Thread Anton Smirnov
Hi! I'm writing a polyfill for ext-random and I noticed a small weirdness. PcgOneseq128XslRr64::jump() accepts negative $advance where it automagically becomes unsigned positive. Does it make sense or maybe it's better to throw a ValueError there? -- Anton -- PHP Internals - PHP Runtime

Re: [PHP-DEV] [RFC][Vote] Auto-capture closures

2022-07-01 Thread Anton Smirnov
On Fri, 2022-07-01 at 16:11 +0200, Hans Henrik Bergan wrote: > > As far as we are aware, only two languages in widespread use > > require variables to be explicitly closed over: PHP and C++. All > > other major languages capture implicitly, as is proposed here. But do any of them auto-capture by

Re: [PHP-DEV] [RFC] Disjunctive Normal Form Types

2022-03-19 Thread Anton Smirnov
On Sat, 2022-03-19 at 16:38 +, G. P. B. wrote: > DNF types are a way to mix intersection and union types together in a > single type. > For example: >  - (A)|null >  - (Traversable)|array Hello George, I like your proposal. I would like to offer 2 suggestions however: 1. I think that syntax