[PHP-DEV] [RFC] Readonly properties

2021-06-04 Thread Nikita Popov
Hi internals, I'd like to open the discussion on readonly properties: https://wiki.php.net/rfc/readonly_properties_v2 This proposal is similar to the https://wiki.php.net/rfc/write_once_properties RFC that has been declined previously. One significant difference is that the new RFC limits the

Re: [PHP-DEV] [RFC] [Vote] Adding return types to internal methods

2021-06-03 Thread Nikita Popov
On Thu, Apr 22, 2021 at 9:42 AM Máté Kocsis wrote: > Hi Internals, > > I've just opened the vote about > https://wiki.php.net/rfc/internal_method_return_types > and I will close it on 2021-05-06. > > For prior discussion, please see https://externals.io/message/113413 > > Regards: > Máté > One

Re: [PHP-DEV] RFC karma for tdgroot

2021-06-03 Thread Nikita Popov
On Thu, Jun 3, 2021 at 3:02 PM Timon de Groot wrote: > I'm requesting RFC karma for my proposal in discussion '[PHP-DEV] > json_encode indent parameter'. > > For those interested in my public profile, please see my Github profile: > https://github.com/tdgroot. > > If you have any questions,

Re: [PHP-DEV] [VOTE] Allow static properties in enums

2021-06-02 Thread Nikita Popov
On Tue, Jun 1, 2021 at 3:25 PM tyson andre wrote: > Hi internals, > > I have opened the vote on > https://wiki.php.net/rfc/enum_allow_static_properties > Voting ends on June 15, 2021 > > Previous discussion can be found at https://externals.io/message/114494 > > Thanks, > Tyson > I'm neutral on

Re: [PHP-DEV] Re: [RFC] [Draft] Add Randomizer class (before: Add RNG extension)

2021-06-01 Thread Nikita Popov
On Mon, May 31, 2021 at 4:04 PM Go Kudo wrote: > Hi Internals. > Hi :) Thanks for your continued work on this RFC. This is a tough one, with a lot of feedback, some of it contradictory. I'm still going to add my 2c... I think that this proposal can basically work out in two ways: 1.

Re: [PHP-DEV] A little syntactic sugar on array_* function calls?

2021-05-31 Thread Nikita Popov
On Fri, May 28, 2021 at 9:00 PM Mark Randall wrote: > On 28/05/2021 15:31, Nikita Popov wrote: > > This is a more complex case. In this case the compiler doesn't know in > > advance whether the argument is passed by value or by reference. What > > happens here is: > &

Re: [PHP-DEV] A little syntactic sugar on array_* function calls?

2021-05-31 Thread Nikita Popov
On Fri, May 28, 2021 at 11:01 PM Mike Schinkel wrote: > Hi Nikita, > > Thank you for taking the time to explain in detail. > > One more question below. > > -Mike > > On May 28, 2021, at 10:31 AM, Nikita Popov wrote: > > On Fri, May 28, 2021 at 3:11 AM Mike

Re: [PHP-DEV] [VOTE] Add IntlDatePatternGenerator

2021-05-31 Thread Nikita Popov
On Sat, May 29, 2021 at 4:25 PM Christoph M. Becker wrote: > On 29.05.2021 at 10:02, Mel Dafert wrote: > > >> Agreed with Nikita. There's no compelling reason to add double-API > style anymore. It may take a second RFC to modify this one to remove > those, technically, but I'd vote for it. > >

Re: [PHP-DEV] [VOTE] Add IntlDatePatternGenerator

2021-05-28 Thread Nikita Popov
On Fri, May 14, 2021 at 5:56 PM Mel Dafert wrote: > Hi Internals, > I have opened the vote on > https://wiki.php.net/rfc/intldatetimepatterngenerator. > I will close it on 2021-05-28. > > For previous discussion see https://externals.io/message/113831 and > https://externals.io/message/114124. >

Re: [PHP-DEV] A little syntactic sugar on array_* function calls?

2021-05-28 Thread Nikita Popov
On Fri, May 28, 2021 at 3:11 AM Mike Schinkel wrote: > > On May 26, 2021, at 7:44 PM, Hendra Gunawan > wrote: > > > > Hello. > > > >> > >> Yes, but Nikita wrote this note about technical limitations at the > bottom of the repo README: > >> > >> Due to technical limitations, it is not possible

Re: [PHP-DEV] Escape \0 in var_dump() output

2021-05-28 Thread Nikita Popov
On Thu, May 27, 2021 at 6:11 PM Sara Golemon wrote: > On Thu, May 27, 2021 at 9:07 AM Nikita Popov wrote: > >> Ah, I think I explained the original issue badly: The test runner output >> isn't really a problem, or at least I never perceived it to be. >> >> The

Re: [PHP-DEV] Escape \0 in var_dump() output

2021-05-27 Thread Nikita Popov
On Thu, May 27, 2021 at 3:54 PM Sara Golemon wrote: > On Thu, May 27, 2021 at 8:42 AM Nikita Popov wrote: > >> The most prudent and BC-safe thing would be to add another function >>> `var_dump_escaped()` or even to prefer/advise json_encode() when content >>> safe

Re: [PHP-DEV] Escape \0 in var_dump() output

2021-05-27 Thread Nikita Popov
On Thu, May 27, 2021 at 3:22 PM Sara Golemon wrote: > On Thu, May 27, 2021 at 5:44 AM Nikita Popov wrote: > >> https://github.com/php/php-src/pull/7059 does a surgical change to >> replace >> null bytes with \0. >> >> > Before delving into any ot

[PHP-DEV] Escape \0 in var_dump() output

2021-05-27 Thread Nikita Popov
Hi internals, A regular annoyance with our test suite is that var_dump() prints null bytes literally, those null bytes get into our test expectations, the test is interpreted as a binary file by git, and diffs will not be shown on GitHub. Of course, the null bytes are also confusing to the

Re: [PHP-DEV] Allow combining arg unpacking and named args

2021-05-25 Thread Nikita Popov
On Tue, May 25, 2021 at 4:36 PM Levi Morrison wrote: > On Tue, May 25, 2021 at 8:18 AM Nikita Popov wrote: > > > > Hi internals, > > > > Currently, argument unpacking (...$foo) cannot be combined with named > > arguments (foo: $bar) at all. Both fun

[PHP-DEV] Allow combining arg unpacking and named args

2021-05-25 Thread Nikita Popov
Hi internals, Currently, argument unpacking (...$foo) cannot be combined with named arguments (foo: $bar) at all. Both func(...$args, x: $y) and func(x: $y, ...$args) are rejected by the compiler. https://github.com/php/php-src/pull/7009 relaxes this by allowing func(...$args, x: $y). The named

Re: [PHP-DEV] Re: Bugsnet

2021-05-25 Thread Nikita Popov
On Tue, May 25, 2021 at 3:10 PM Christoph M. Becker wrote: > On 25.05.2021 at 14:57, Nikita Popov wrote: > > > To make some forward progress here, I think a good starting point would > be > > to enable GitHub issues on the doc-* repos to get some usage experience > in &g

[PHP-DEV] HTTP Early Hint support

2021-05-25 Thread Nikita Popov
Hi internals, Currently, PHP only supports sending one set of headers. HTTP 1xx status codes may require sending multiple sets of headers. In particular, to use 103 Early Hints you need to first send Link headers for early hints, and then, once your actual response is ready, send the usual

Re: [PHP-DEV] Re: Bugsnet

2021-05-25 Thread Nikita Popov
On Mon, May 10, 2021 at 11:22 PM Christoph M. Becker wrote: > On 10.05.2021 at 17:10, Nikita Popov wrote: > > > * As was already mentioned, there's no support for security issues, so > > we'd retain bugs.php.net for that purpose, at least for the time being. > > B

Re: [PHP-DEV] Bug with str_replace

2021-05-25 Thread Nikita Popov
On Tue, May 25, 2021 at 12:13 PM Eugene Sidelnyk wrote: > When use str_replace with arrays there's strange behavior > > https://3v4l.org/maNqa > > > ```php > var_dump(str_replace( > [ > ',', > '.', > ],[ > '.', >

Re: [PHP-DEV] [RFC] First-class callable syntax

2021-05-20 Thread Nikita Popov
On Thu, May 20, 2021 at 6:22 PM Luis Henrique wrote: > On 20/05/2021 12:55, Guilliam Xavier wrote: > > On Thu, May 20, 2021 at 5:12 PM Nikita Popov > wrote: > > > >> On Thu, May 20, 2021 at 4:16 PM Ondřej Mirtes wrote: > >> > >>> Hi, I’m

Re: [PHP-DEV] [RFC] First-class callable syntax

2021-05-20 Thread Nikita Popov
On Thu, May 20, 2021 at 4:16 PM Ondřej Mirtes wrote: > Hi, I’m confused by the syntax, when I read it, I think to myself “I know > this, this is just a method call… oh wait, it’s actually a callable”. It > really makes my head hurt. > Yes, I can see how that could be confusing. The current

[PHP-DEV] [RFC] First-class callable syntax

2021-05-20 Thread Nikita Popov
Hi internals, I'd like to present an RFC for a first-class callable syntax, which is intended as a simpler alternative to the partial function application (PFA) proposal: https://wiki.php.net/rfc/first_class_callable_syntax See the Rationale section for details on how this relates to PFA. Over

Re: [PHP-DEV] Discussion: Object-scoped RNG

2021-05-12 Thread Nikita Popov
On Wed, May 12, 2021 at 4:51 PM Levi Morrison via internals < internals@lists.php.net> wrote: > > Also, I am happy to see that Nikita's rules for namespace assignment to > extensions have been approved. I'm going to use the `RNG` namespace. > > Just to be clear, you can only use `RNG` as a

[PHP-DEV] Re: Disable interactive mode (-a) if readline not available

2021-05-12 Thread Nikita Popov
On Wed, May 12, 2021 at 3:42 PM Christoph M. Becker wrote: > On 12.05.2021 at 10:12, Nikita Popov wrote: > > > I think we would be better off disabling -a completely if readline is not > > available, and exit with a helpful error message. I've opened > > https://github.c

Re: [PHP-DEV] Disable interactive mode (-a) if readline not available

2021-05-12 Thread Nikita Popov
On Wed, May 12, 2021 at 11:44 AM Michelangelo van Dam wrote: > > > > On 12 May 2021, at 11:39, Pierre wrote: > > > > Le 12/05/2021 à 11:29, Joe Watkins a écrit : > >> Morning Nikita, > >> > >> +1 on the change to cli. > >> > >> It can't really be a default extension right now because readline >

Re: [PHP-DEV] Trait constants

2021-05-12 Thread Nikita Popov
On Wed, May 12, 2021 at 11:38 AM Guilliam Xavier wrote: > > > On Sun, Jun 28, 2020 at 2:34 PM Nikita Popov wrote: > >> On Sat, Jun 27, 2020 at 3:53 PM Stephen Reay >> wrote: >> >> > Hi, >> > >> > It’s always struck me as slightly odd th

[PHP-DEV] Forget debug_print_backtrace() like exception backtraces

2021-05-12 Thread Nikita Popov
Hi internals, For historical reasons, debug_print_backtrace() and exceptions implemented their own logic for formatting backtraces. I don't think there's any particular reason to have different output from both, so I've put up https://github.com/php/php-src/pull/6977 to use the much more widely

Re: [PHP-DEV] Disable interactive mode (-a) if readline not available

2021-05-12 Thread Nikita Popov
On Wed, May 12, 2021 at 10:37 AM Moritz Friedrich wrote: > > > Am 12.05.2021 um 10:12 schrieb Nikita Popov : > > > > Hi internals, > > > > If the readline extension is enabled, PHP provides an interactive shell > > under -a. If it is not enabled, it falls

[PHP-DEV] Disable interactive mode (-a) if readline not available

2021-05-12 Thread Nikita Popov
Hi internals, If the readline extension is enabled, PHP provides an interactive shell under -a. If it is not enabled, it falls back to an "interactive mode" (yes, the difference between "interactive shell" and "interactive mode" is important here). The interactive mode is simply an stdin input,

Re: [PHP-DEV] [RFC][Draft] Body-less __construct

2021-05-11 Thread Nikita Popov
On Tue, May 11, 2021 at 6:56 PM Matt Fonda wrote: > On Tue, May 11, 2021 at 7:45 AM Nikita Popov wrote: > >> My thought here is that a constructor with (only) promoted properties is >> hardly a constructor at all -- it's more like a special syntax for >> declaring prope

Re: [PHP-DEV] [RFC][Draft] Body-less __construct

2021-05-11 Thread Nikita Popov
On Tue, May 11, 2021 at 4:37 PM Côme Chilliet < come.chill...@fusiondirectory.org> wrote: > Le Tue, 11 May 2021 10:58:57 +0200, > Nikita Popov a écrit : > > > If we allow it, I would restrict it to specifically the case of a) a > > promoted constructor b) which has *o

Re: [PHP-DEV] [RFC][Draft] Body-less __construct

2021-05-11 Thread Nikita Popov
ut up a quick implementation for this: https://github.com/php/php-src/pull/6972 As this seems somewhat controversial, I'm afraid this change will have to go through the RFC process. Nikita > On Tue, May 11, 2021 at 10:58, Nikita Popov wrote: > > On Mon, May 10, 2021 at 10:29 AM Matīss Tr

Re: [PHP-DEV] [RFC] New in initializers

2021-05-11 Thread Nikita Popov
On Fri, Mar 19, 2021 at 2:02 PM Nikita Popov wrote: > On Fri, Mar 19, 2021 at 12:57 PM Nikita Popov > wrote: > >> On Fri, Mar 19, 2021 at 12:22 PM Nikita Popov >> wrote: >> >>> On Wed, Mar 3, 2021 at 7:04 PM Alexandru Pătrănescu >>> wrote: >&g

Re: [PHP-DEV] [RFC][Draft] Body-less __construct

2021-05-11 Thread Nikita Popov
On Mon, May 10, 2021 at 10:29 AM Matīss Treinis wrote: > Hi everyone, > > Since constructor property promotion is now implemented, and it looks > like it could become a widely used feature, I am proposing a small, > cosmetic change in syntax for constructors in concrete classes to do > away with

[PHP-DEV] [RFC] Deprecate ticks

2021-05-11 Thread Nikita Popov
Hi internals, I'd like to propose the depreciation of the ticks mechanism: https://wiki.php.net/rfc/deprecate_ticks I'm submitting this separately from the PHP 8.1 deprecations RFC, as this is a language change, even if not a particularly important one... Regards, Nikita

Re: [PHP-DEV] Re: Bugsnet

2021-05-10 Thread Nikita Popov
On Mon, May 10, 2021 at 3:29 PM Dan Ackroyd wrote: > Hi Joe, > > > We have a spam problem on bugsnet > > I would snarkily say "maybe accept the PRs from people wanting to work > on it?", but I realise that ignores the underlying problem, that PHP > lacks people. And particularly lacks people who

Re: [PHP-DEV] PHP Language Specification

2021-05-07 Thread Nikita Popov
On Thu, May 6, 2021 at 4:01 PM Christoph M. Becker wrote: > Hi all, > > I wonder what to do with the PHP Language Specification[1]. Apparently, > the repo is abandoned (last commit was more than a year ago, although > PHP 8 changed quite some stuff). If we don't have the bandwidth to >

Re: [PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Nikita Popov
On Tue, May 4, 2021 at 12:58 PM Marco Pivetta wrote: > Hey NikiC, > > On Tue, May 4, 2021, 12:34 Nikita Popov wrote: > >> Hi internals, >> >> I'd like to present an RFC for property accessors: >> https://wiki.php.net/rfc/property_accessors >> >&g

[PHP-DEV] [RFC] Property accessors

2021-05-04 Thread Nikita Popov
Hi internals, I'd like to present an RFC for property accessors: https://wiki.php.net/rfc/property_accessors Property accessors are like __get() and __set(), but for a single property. They also support read-only properties and properties with asymmetric visibility (public read, private write)

[PHP-DEV] Re: [VOTE] Namespaced in bundled extensions

2021-05-03 Thread Nikita Popov
On Mon, Apr 19, 2021 at 3:11 PM Nikita Popov wrote: > Hi internals, > > I've opened the vote on > https://wiki.php.net/rfc/namespaces_in_bundled_extensions. Voting will > close 2021-05-03. > > Please see https://externals.io/message/113270 and > https://ext

Re: [PHP-DEV] Why am I unable to use 'readline_on_new_line()' on my windows machine?

2021-04-30 Thread Nikita Popov
On Thu, Apr 29, 2021 at 5:51 PM Hamza Ahmad wrote: > Hello Internals, > I am unable to call readline_on_new_line() function. > I am posting this to internals to confirm whether it is a bug or an issue > with docs. > The manual suggests that this function is available on php 8. >

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-04-29 Thread Nikita Popov
On Thu, Apr 29, 2021 at 12:00 AM Nuno Maduro wrote: > On Wed, 28 Apr 2021 at 15:31, Nikita Popov wrote: > >> On Wed, Mar 24, 2021 at 5:20 PM Larry Garfield >> wrote: >> >> > Greetings, Internalians. >> > >> > Some months back I p

Re: [PHP-DEV] Retire distributions repo in favor of something more suitable

2021-04-28 Thread Nikita Popov
ell. There are webhooks for changes to releases, which also list assets and who uploaded them. That should at least make us aware of any changes. Nikita > On Wed, 28 Apr 2021 at 15:52, Nikita Popov wrote: > >> On Tue, Apr 27, 2021 at 4:41 PM Christoph M. Becker >> wrote: >>

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-04-28 Thread Nikita Popov
On Wed, Mar 24, 2021 at 5:20 PM Larry Garfield wrote: > Greetings, Internalians. > > Some months back I proposed an RFC for short functions. > > https://wiki.php.net/rfc/short-functions > > After some discussion, I put it on hold to ensure that it was compatible > with the other discussion

Re: [PHP-DEV] Retire distributions repo in favor of something more suitable

2021-04-28 Thread Nikita Popov
On Tue, Apr 27, 2021 at 4:41 PM Christoph M. Becker wrote: > Hi all, > > the distributions repo[1] is huge (current ~ 26GiB), and it will grow > further over time; that causes issues when trying to check it out[2], > and frankly, I don't see why were having the tarballs in a VCS at all. > >

[PHP-DEV] Re: [VOTE] Static variables in inherited methods

2021-04-28 Thread Nikita Popov
On Wed, Apr 14, 2021 at 10:31 AM Nikita Popov wrote: > Hi internals, > > I've opened voting on https://wiki.php.net/rfc/static_variable_inheritance. > Voting closes 2021-04-28. > > Please see https://externals.io/message/113219 and > https://externals.io/message/113594 f

[PHP-DEV] Re: [VOTE] Phasing out Serializable

2021-04-28 Thread Nikita Popov
On Wed, Apr 14, 2021 at 10:22 AM Nikita Popov wrote: > Hi internals, > > I've opened voting on https://wiki.php.net/rfc/phase_out_serializable. > The vote closes 2021-04-28. > > See https://externals.io/message/112454 and > https://externals.io/message/113736 for di

[PHP-DEV] Re: [PHP-CVS] [php-src] master: Fix build warning

2021-04-27 Thread Nikita Popov
On Tue, Apr 27, 2021 at 10:13 AM Stanislav Malyshev wrote: > Hi! > > On 4/27/21 1:11 AM, Nikita Popov wrote: > > Author: Nikita Popov (nikic) > > Date: 2021-04-27T10:10:22+02:00 > > > > Commit: > https://github.com/php/php-src/commit/310c0561a9e5ec9a0414654cc9

[PHP-DEV] log_errors_max_len ini setting

2021-04-26 Thread Nikita Popov
Hi internals, In PHP 8.0, as part of some refactoring of the error handling system, I've accidentally dropped support for the log_errors_max_len ini setting. The setting still exists, but doesn't do anything. https://github.com/php/php-src/pull/6838 was opened to drop it entirely, rather than

Re: [PHP-DEV] [RFC] [Vote] Adding return types to internal methods

2021-04-22 Thread Nikita Popov
On Thu, Apr 22, 2021 at 11:51 AM Marco Pivetta wrote: > On Thu, Apr 22, 2021 at 10:37 AM Nikita Popov > wrote: > >> >> To clarify what you're actually suggesting here: Do you want to always >> have the type returned from getReturnType() >> > > Correct

Re: [PHP-DEV] [RFC] [Vote] Adding return types to internal methods

2021-04-22 Thread Nikita Popov
On Thu, Apr 22, 2021 at 9:56 AM Marco Pivetta wrote: > Hey Máté, > > On Thu, Apr 22, 2021, 09:42 Máté Kocsis wrote: > > > Hi Internals, > > > > I've just opened the vote about > > https://wiki.php.net/rfc/internal_method_return_types > > and I will close it on 2021-05-06. > > > > For prior

Re: [PHP-DEV] Binary (un)safety of password_hash() used with PASSWORD_BCRYPT

2021-04-22 Thread Nikita Popov
On Thu, Apr 22, 2021 at 3:48 AM Sara Golemon wrote: > I have this notion that we've discussed this before, I'm certain I knew > that bcrypt wasn't binary safe, but someone reminded me that > password_hash() could be called with null bytes in the password itself and > that is just SCREAMING to

[PHP-DEV] [VOTE] Namespaced in bundled extensions

2021-04-19 Thread Nikita Popov
Hi internals, I've opened the vote on https://wiki.php.net/rfc/namespaces_in_bundled_extensions. Voting will close 2021-05-03. Please see https://externals.io/message/113270 and https://externals.io/message/113960 for discussions relating to this RFC. Regards, Nikita

Re: [PHP-DEV] Re: [RFC] Autoloader Classmap

2021-04-19 Thread Nikita Popov
On Wed, Apr 7, 2021 at 11:06 AM Jordi Boggiano wrote: > Hi Mark, > > On 06/04/2021 00:05, Mark Randall wrote: > > > > * I expect 99.% of users will never know it exists, and it will > > instead just be an option for tools like composer that will provide a > > small transparent boost. > > > I

Re: [PHP-DEV] [RFC] [Draft] Final constants

2021-04-18 Thread Nikita Popov
On Sun, Apr 18, 2021 at 4:20 PM Máté Kocsis wrote: > Hi Internals, > > I've recently realized that class constant values cannot always be trusted > when late static binding is involved (e.g. static::FOO or $this::FOO), > since they can be freely overridden in child classes. That's why the engine

Re: [PHP-DEV] [VOTE] Deprecate implicit non-integer-compatible float to int conversions

2021-04-17 Thread Nikita Popov
On Sat, Apr 17, 2021 at 4:30 PM Hans Henrik Bergan wrote: > just want to double check, 1.009 will then be an incompatible > cast to int(1), right? because the 0.009 will be lost? > That's right. Something to keep in mind is that your example could have just as well been

Re: [PHP-DEV] [RFC] Namespaced in bundled extensions

2021-04-15 Thread Nikita Popov
On Wed, Apr 14, 2021 at 5:39 PM Larry Garfield wrote: > On Wed, Apr 14, 2021, at 9:52 AM, Nikita Popov wrote: > > > >> > All symbols defined in the extension should be part of the top-level > > >> namespace or a sub-namespace. > > >>

Re: [PHP-DEV] [RFC] Namespaced in bundled extensions

2021-04-14 Thread Nikita Popov
On Wed, Apr 14, 2021 at 4:18 PM Nikita Popov wrote: > On Mon, Apr 5, 2021 at 8:05 PM tyson andre > wrote: > >> > > The question of namespaces in the stdlib has been coming up a lot >> recently, >> > > so I'd like to present my own stab at resol

Re: [PHP-DEV] [RFC] Namespaced in bundled extensions

2021-04-14 Thread Nikita Popov
On Mon, Apr 5, 2021 at 8:05 PM tyson andre wrote: > > > The question of namespaces in the stdlib has been coming up a lot > recently, > > > so I'd like to present my own stab at resolving this question: > > > > > > https://wiki.php.net/rfc/namespaces_in_bundled_extensions > > > > > > Relative to

Re: [PHP-DEV] [RFC] [Discussion] Adding return types to internal methods

2021-04-14 Thread Nikita Popov
On Sat, Mar 6, 2021 at 11:56 PM Máté Kocsis wrote: > Hi Internals, > > I've just finished the first iteration of the RFC ( > https://wiki.php.net/rfc/internal_method_return_types) as well as the > implementation based on the feedback Nikita and Nicolas provided. Thus, I'd > like to start the

Re: [PHP-DEV] [RFC] Add fetch_column method to mysqli

2021-04-14 Thread Nikita Popov
On Sun, Mar 28, 2021 at 6:00 PM Kamil Tekiela wrote: > Hi Internals, > > I have written a new proposal in the series of improvements to mysqli > extension. This one aims to add a new method mysqli_result::fetch_column as > well as its functional counterpart. > >

[PHP-DEV] [VOTE] Static variables in inherited methods

2021-04-14 Thread Nikita Popov
Hi internals, I've opened voting on https://wiki.php.net/rfc/static_variable_inheritance. Voting closes 2021-04-28. Please see https://externals.io/message/113219 and https://externals.io/message/113594 for related discussion. Regards, Nikita

[PHP-DEV] [VOTE] Phasing out Serializable

2021-04-14 Thread Nikita Popov
Hi internals, I've opened voting on https://wiki.php.net/rfc/phase_out_serializable. The vote closes 2021-04-28. See https://externals.io/message/112454 and https://externals.io/message/113736 for discussions of this RFC. Regards, Nikita

Re: [PHP-DEV] add php.ini entry to set default user_agent for curl

2021-04-12 Thread Nikita Popov
On Thu, Apr 8, 2021 at 2:41 PM Michael Maroszek wrote: > Dear Internals, > I'd like to suggest a new enhancement for 8.1 as outlined in the title. > > The initial pull request is here: > https://github.com/php/php-src/pull/6834/files > > --- Details: > Since quite a while PHP offers a dedicated

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1

2021-04-12 Thread Nikita Popov
On Mon, Apr 12, 2021 at 3:15 PM Máté Kocsis wrote: > Hi Nikita and Stanislav, > > > > get_class(), get_parent_class() and get_called_class() without >> argument >> > >> > I'm not sure why. I mean if we want to make them return the same as >> > self::class etc. - up to the point of actually

[PHP-DEV] Re: [RFC] Deprecations for PHP 8.1

2021-04-12 Thread Nikita Popov
On Fri, Mar 26, 2021 at 3:41 PM Christoph M. Becker wrote: > On 22.03.2021 at 10:24, Nikita Popov wrote: > > > It's time for another deprecation RFC: > > https://wiki.php.net/rfc/deprecations_php_8_1 > > > > As we're still early in the release cycle, it's still

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1

2021-04-12 Thread Nikita Popov
On Tue, Mar 23, 2021 at 10:44 PM Kalle Sommer Nielsen wrote: > Hi > > Den man. 22. mar. 2021 kl. 11.25 skrev Nikita Popov >: > > > > Hi internals, > > > > It's time for another deprecation RFC: > > https://wiki.php.net/rfc/deprecations_php_8_1 &

[PHP-DEV] Re: [RFC] Deprecations for PHP 8.1

2021-04-12 Thread Nikita Popov
On Mon, Mar 22, 2021 at 10:24 AM Nikita Popov wrote: > Hi internals, > > It's time for another deprecation RFC: > https://wiki.php.net/rfc/deprecations_php_8_1 > I have updated the RFC to include two more items: * The filter.default ini setting, aka "magic q

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1

2021-04-12 Thread Nikita Popov
On Tue, Mar 23, 2021 at 6:05 AM Stanislav Malyshev wrote: > Hi! > > > date_sunrise() and date_sunset() > > Do we have any information on usage? I am generally not a fan of > deprecating functions that work - even if they are odd and have quirky > APIs - but if the usage is essentially zero than

[PHP-DEV] Allow commit() without transaction?

2021-04-12 Thread Nikita Popov
Hi internals, Since PHP 8.0, PDO fully supports MySQL transactions -- this means that inTransaction() will report the actual connection transaction state, as opposed to an emulated (incorrect) transaction state tracked by PDO itself. This has two primary effects: PDO is aware of transactions

Re: [PHP-DEV] Required parameter after optional one

2021-04-12 Thread Nikita Popov
On Fri, Apr 9, 2021 at 9:24 AM Benjamin Morel wrote: > Hi internals, > > I'm wondering why PHP 8 started warning about required parameters declared > after optional ones, when this version is the one that also introduced > named parameters, which can take advantage of this: > > ``` > function

[PHP-DEV] Update on git.php.net incident

2021-04-06 Thread Nikita Popov
Hi everyone, I would like to provide an update regarding the git.php.net security incident. To briefly summarize the most important information: * We no longer believe the git.php.net server has been compromised. However, it is possible that the master.php.net user database leaked. *

Re: [PHP-DEV] Changes to Git commit workflow

2021-04-01 Thread Nikita Popov
his issue is probably fixed by https://github.com/php/web-master/commit/d0cac5411f97ec9df5995a632c20da770a77dedb . Nikita -Original Message- > From: Nikita Popov > Sent: Monday, March 29, 2021 6:52 AM > To: PHP internals ; PHP Doc Mailing List < > php...@lists.php.net&g

[PHP-DEV] Re: Changes to Git commit workflow

2021-03-28 Thread Nikita Popov
On Mon, Mar 29, 2021 at 12:52 AM Nikita Popov wrote: > Hi everyone, > > Yesterday (2021-03-28) two malicious commits were pushed to the php-src > repo [1] from the names of Rasmus Lerdorf and myself. We don't yet know how > exactly this happened, but everything points towar

[PHP-DEV] Changes to Git commit workflow

2021-03-28 Thread Nikita Popov
Hi everyone, Yesterday (2021-03-28) two malicious commits were pushed to the php-src repo [1] from the names of Rasmus Lerdorf and myself. We don't yet know how exactly this happened, but everything points towards a compromise of the git.php.net server (rather than a compromise of an individual

Re: [PHP-DEV] [RFC] debug_backtrace_depth(int $limit=0): int

2021-03-28 Thread Nikita Popov
On Sat, Mar 13, 2021 at 6:30 PM tyson andre wrote: > Hi internals, > > I've created a new RFC https://wiki.php.net/rfc/debug_backtrace_depth to > return the depth of the current stack trace. > > Inspecting the current stack trace depth is occasionally useful for > 1. Manually debugging with

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2

2021-03-24 Thread Nikita Popov
On Wed, Mar 24, 2021 at 5:20 PM Larry Garfield wrote: > Greetings, Internalians. > > Some months back I proposed an RFC for short functions. > > https://wiki.php.net/rfc/short-functions > > After some discussion, I put it on hold to ensure that it was compatible > with the other discussion

Re: [PHP-DEV] [RFC] Phasing out Serializable

2021-03-24 Thread Nikita Popov
On Wed, Mar 24, 2021 at 10:38 AM Côme Chilliet < come.chill...@fusiondirectory.org> wrote: > Le Tue, 23 Mar 2021 17:01:40 +0100, > Nicolas Grekas a écrit : > > Picking up a loose thread: > > > https://wiki.php.net/rfc/custom_object_serialization introduced a > > > replacement for Serializable in

Re: [PHP-DEV] [RFC] Phasing out Serializable

2021-03-23 Thread Nikita Popov
On Tue, Mar 23, 2021 at 5:01 PM Nicolas Grekas wrote: > Hello Nikita, > > > Picking up a loose thread: >> https://wiki.php.net/rfc/custom_object_serialization introduced a >> replacement for Serializable in PHP 7.4, so it's time to think about >> deprecating and removing the old mechanism: >> >>

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1

2021-03-22 Thread Nikita Popov
On Mon, Mar 22, 2021 at 3:58 PM Ben Ramsey wrote: > > On Mar 22, 2021, at 04:24, Nikita Popov wrote: > > > > Hi internals, > > > > It's time for another deprecation RFC: > > https://wiki.php.net/rfc/deprecations_php_8_1 > > > > This is a collectio

Re: [PHP-DEV] [RFC] Namespaced in bundled extensions

2021-03-22 Thread Nikita Popov
On Fri, Mar 19, 2021 at 7:28 PM Mike Schinkel wrote: > > On Feb 25, 2021, at 3:26 PM, Nikita Popov wrote: > > > > Hi internals, > > > > The question of namespaces in the stdlib has been coming up a lot > recently, > > so I'd like to present my own stab at

Re: [PHP-DEV] [RFC] [VOTE] mysqli bind in execute

2021-03-22 Thread Nikita Popov
On Tue, Mar 9, 2021 at 12:13 AM Kamil Tekiela wrote: > Hi Internals, > > I have opened voting on https://wiki.php.net/rfc/mysqli_bind_in_execute > Voting ends on 27th March > A minor BC break is not mentioned in the RFC: Classes extending mysqli_stmt::execute() will be required to specify the

[PHP-DEV] [RFC] Deprecations for PHP 8.1

2021-03-22 Thread Nikita Popov
Hi internals, It's time for another deprecation RFC: https://wiki.php.net/rfc/deprecations_php_8_1 This is a collection of minor deprecations that various people have put together over the last ~2 years. This RFC was formerly targeted at PHP 8.0, but was delayed to PHP 8.1 to reduce the amount

Re: [PHP-DEV] [RFC] noreturn type

2021-03-19 Thread Nikita Popov
On Fri, Mar 19, 2021 at 3:45 PM Marco Pivetta wrote: > Hey Nikita, > > On Fri, Mar 19, 2021, 14:35 Nikita Popov wrote: > >> >> Is it allowed to declare a noreturn function that returns by reference? >> >> function (): noreturn {} >> > > Given tha

Re: [PHP-DEV] [RFC] Autoloader Classmap

2021-03-19 Thread Nikita Popov
On Mon, Mar 15, 2021 at 6:41 PM Mark Randall wrote: > Hi Internals, > > I would like to propose the addition of a new mechanism of autoloading > classes - a classmap that will be consulted prior to checking the > spl_autoload_register'd callbacks. > > https://wiki.php.net/rfc/autoload_classmap

Re: [PHP-DEV] [RFC] Namespaced in bundled extensions

2021-03-19 Thread Nikita Popov
On Fri, Mar 19, 2021 at 3:04 PM tyson andre wrote: > Hi Nikita Popov, > > > The question of namespaces in the stdlib has been coming up a lot > recently, > > so I'd like to present my own stab at resolving this question: > > > > https://wiki.php.net/rfc

Re: [PHP-DEV] [RFC] noreturn type

2021-03-19 Thread Nikita Popov
On Wed, Mar 10, 2021 at 7:07 PM Matthew Brown wrote: > Hey, > > Ondřej Mirtes and I present an RFC for the noreturn type: > https://wiki.php.net/rfc/noreturn_type > > The feature already exists in Hack (the primary inspiration) and is > currently supported by our static analysis tools inside

[PHP-DEV] Re: Don't compare zero exponentials in strings as equal

2021-03-19 Thread Nikita Popov
On Wed, Mar 3, 2021 at 3:04 PM Nikita Popov wrote: > Hi internals, > > PHP's == comparison semantics for strings have a peculiar edge-case, where > comparisons of the form "0e123" == "0e456" return true, because they are > interpreted as floating point zero nu

Re: [PHP-DEV] [RFC] New in initializers

2021-03-19 Thread Nikita Popov
On Fri, Mar 19, 2021 at 12:57 PM Nikita Popov wrote: > On Fri, Mar 19, 2021 at 12:22 PM Nikita Popov > wrote: > >> On Wed, Mar 3, 2021 at 7:04 PM Alexandru Pătrănescu >> wrote: >> >>> >>> On Wed, Mar 3, 2021 at 5:49 PM Nikita Popov >>> wr

Re: [PHP-DEV] [RFC] New in initializers

2021-03-19 Thread Nikita Popov
On Fri, Mar 19, 2021 at 12:22 PM Nikita Popov wrote: > On Wed, Mar 3, 2021 at 7:04 PM Alexandru Pătrănescu > wrote: > >> >> On Wed, Mar 3, 2021 at 5:49 PM Nikita Popov wrote: >> >>> On Wed, Mar 3, 2021 at 4:28 PM Alexandru Pătrănescu >>> wrote

Re: [PHP-DEV] [RFC] New in initializers

2021-03-19 Thread Nikita Popov
On Wed, Mar 3, 2021 at 7:04 PM Alexandru Pătrănescu wrote: > > On Wed, Mar 3, 2021 at 5:49 PM Nikita Popov wrote: > >> On Wed, Mar 3, 2021 at 4:28 PM Alexandru Pătrănescu >> wrote: >> >>> Hi, >>> >>> This looks very nice and I'm interest

Re: [PHP-DEV] Re: [RFC] Static variables in inherited methods

2021-03-17 Thread Nikita Popov
On Wed, Mar 17, 2021 at 5:48 PM Alexandru Pătrănescu wrote: > > On Wed, Mar 17, 2021 at 5:30 PM Nikita Popov wrote: > >> On Tue, Feb 23, 2021 at 3:01 PM Nikita Popov >> wrote: >> >> > Hi internals, >> > >> > While looking into various

[PHP-DEV] Re: [RFC] Static variables in inherited methods

2021-03-17 Thread Nikita Popov
On Tue, Feb 23, 2021 at 3:01 PM Nikita Popov wrote: > Hi internals, > > While looking into various issues related to static variable handling, > I've become increasingly convinced that our handling of static variables in > inherited methods is outright buggy. However, it's als

Re: [PHP-DEV] [RFC] noreturn type

2021-03-15 Thread Nikita Popov
On Wed, Mar 10, 2021 at 7:07 PM Matthew Brown wrote: > Hey, > > Ondřej Mirtes and I present an RFC for the noreturn type: > https://wiki.php.net/rfc/noreturn_type > > The feature already exists in Hack (the primary inspiration) and is > currently supported by our static analysis tools inside

Re: [PHP-DEV] RFC: Add `println(string $data = ''): int`

2021-03-15 Thread Nikita Popov
On Mon, Mar 15, 2021 at 4:09 PM Nikita Popov wrote: > On Mon, Mar 15, 2021 at 4:08 AM Sara Golemon wrote: > >> On Sat, Mar 13, 2021 at 1:54 PM tyson andre >> wrote: >> >> > >> > I've created a new RFC https://wiki.php.net/rfc/println >>

Re: [PHP-DEV] RFC: Add `println(string $data = ''): int`

2021-03-15 Thread Nikita Popov
On Mon, Mar 15, 2021 at 4:08 AM Sara Golemon wrote: > On Sat, Mar 13, 2021 at 1:54 PM tyson andre > wrote: > > > > > I've created a new RFC https://wiki.php.net/rfc/println > > This proposes adding a global function to PHP to > > print a string followed by a unix newline (`\n`). > > > > > This

Re: [PHP-DEV] Add support for ::class to constant()

2021-03-15 Thread Nikita Popov
On Tue, Mar 9, 2021 at 11:16 PM Kévin Dunglas wrote: > Hi folks, > > Currently, it's not possible to use the ::class special constant with the > constant() function. This doesn't work: > > var_dump( > constant('\DateTime::class') > ); > > For instance, Twig's constant() helper internally uses

Re: [PHP-DEV] [RFC Proposal] Allow methods to 'become' static

2021-03-15 Thread Nikita Popov
On Mon, Mar 15, 2021 at 2:16 PM Matthew Brown wrote: > On Sun, 14 Mar 2021 at 18:09, Rowan Tommins > wrote: > > > Are you saying that having the parent::getSomeInt() call fail would be > > problematic? > > > > > Yes, that's where this becomes unsound – you can call the child method >

Re: [PHP-DEV] Small annoyances of PHP: Simple fixes would make tests fail

2021-03-05 Thread Nikita Popov
On Fri, Mar 5, 2021 at 1:36 PM Christian Schneider wrote: > Am 19.02.2021 um 16:21 schrieb Sara Golemon : > > On Fri, Feb 19, 2021 at 8:04 AM Christian Schneider < > cschn...@cschneid.com > wrote: > > Indentation in var_export: > > > > The

<    1   2   3   4   5   6   7   8   9   10   >