Re: [PHP-DEV] Union types | true pseudo-type

2020-01-27 Thread Alexandru Pătrănescu
On Mon, Jan 27, 2020 at 11:43 AM Nikita Popov wrote: > On Mon, Jan 20, 2020 at 6:30 PM Benjamin Morel > wrote: > > > Hi internals, > > > > I'd like to bring back the topic of supporting "true" as a type in PHP 8 > > union types. > > Now that the RFC has

Re: [PHP-DEV] [RFC] "use global functions/consts" statement

2020-01-27 Thread tyson andre
https://wiki.php.net/rfc/use_global_elements#implementation_details has been updated after the latest feedback. The implementation was also updated. The opt-in `declare(function_and_const_lookup='global')` directive now only allows declaring a function or constant in a file if the same name has

Re: [PHP-DEV] [RFC] "use global functions/consts" statement

2020-01-27 Thread tyson andre
> Imagine this scenario: > > * PHP 8 introduces the declare with only 'global' and 'default' options > allowed, as proposed. > * PHP 9 makes 'default' a synonym for 'global', because it's now the > default, and adds a new 'fallback' option > * I have an application that uses the fallback mode > I c

Re: [PHP-DEV] [RFC] "use global functions/consts" statement

2020-01-27 Thread Rowan Tommins
On 27/01/2020 14:43, tyson andre wrote: I'd rather have that done when the future change of defaults is being proposed. Supporting 'fallback' might cause confusion and extra work if the name resolution defaults ever change in a different way. At the point where they do change, we either do or do

Re: [PHP-DEV] [RFC] Adding a "Stringable" interface to PHP 8

2020-01-27 Thread Mike Schinkel
> On Jan 27, 2020, at 10:55 AM, Larry Garfield wrote: > > On Mon, Jan 27, 2020, at 10:19 AM, Nikita Popov wrote: >> Automatically implementing interfaces based on implemented methods could >> also be a general language feature (see Go interfaces for example), but >> likely not one we're intereste

Re: [PHP-DEV] Add viable long running execution model to php 8

2020-01-27 Thread Rowan Tommins
On 27/01/2020 15:50, Larry Garfield wrote: I want to point out that there's 2 or 3 very different use cases and models being discussed in this thread, and it's important to keep them separate: [...] Can I add another that's been mentioned in passing: 4. A mechanism for working with WebSocke

Re: [PHP-DEV] Re: [RFC] "use global functions/consts" statement

2020-01-27 Thread tyson andre
> 1. Is it a typo that the first code example in the proposal has a > namespace declaration before the `declare` statement? Currently it is > a fatal error if a `strict_types` declaration isn't the first > statement in a file. Are you intending to change this restriction, > or have it not apply to

Re: [PHP-DEV] Re: [RFC] "use global functions/consts" statement

2020-01-27 Thread Theodore Brown
On Sun, Jan 26, 2020 at 10:25 AM tyson andre wrote: > https://wiki.php.net/rfc/use_global_elements and the implementation > has been updated again - the syntax is now > declare(function_and_const_lookup='global') > with a literal string instead of a keyword. > The voting option for whether it w

Re: [PHP-DEV] [RFC] Adding a "Stringable" interface to PHP 8

2020-01-27 Thread Larry Garfield
On Mon, Jan 27, 2020, at 10:19 AM, Nikita Popov wrote: > On Wed, Jan 22, 2020 at 4:47 PM Nicolas Grekas > wrote: > > > Hello everyone, > > > > as announced last week, I'm officially opening a discussion for adding a > > "Stringable" interface to PHP 8. > > > > The RFC and its rationale are presen

Re: [PHP-DEV] Add viable long running execution model to php 8

2020-01-27 Thread Larry Garfield
On Mon, Jan 27, 2020, at 8:19 AM, Robert Hickman wrote: > > > I'm not sure that would work well for Web Sockets, because it still > > relies on the traditional request-response cycle, but I've never really > > used them, so don't know what kind of architectural patterns make sense for > > them. > >

Re: [PHP-DEV] VCS Account Request: nicolasgrekas

2020-01-27 Thread Paul M. Jones
Hi all, > On Jan 15, 2020, at 06:22, Nicolas Grekas > wrote: > > Thank you for being open to the discussion and reconsidering! I\'ll do > my best to deserve the support I\'ve received :) Say, was there any resolution on this, one way or the other? -- Paul M. Jones pmjo...@pmjones.io http:/

Re: [PHP-DEV] Re: [RFC] "use global functions/consts" statement

2020-01-27 Thread tyson andre
> can we please discuss this alternative? In another reply, you link to > https://wiki.php.net/rfc/use_global_elements#deprecate_the_fallback_to_the_root_namespace_instead > > But this new proposal derived from Nikita's idea is different as it doesn't > need to deprecate anything. I've added h

Re: [PHP-DEV] [RFC] "use global functions/consts" statement

2020-01-27 Thread Nikita Popov
On Mon, Jan 27, 2020 at 3:43 PM tyson andre wrote: > > This would be a compile error right now though, because we don't allow > "use"d symbols and declarations to clash. > > As I surprisingly discovered when implementing the RFC, they don't clash. > The PHP interpreter has a special case where it

Re: [PHP-DEV] [RFC] "use global functions/consts" statement

2020-01-27 Thread tyson andre
> This would be a compile error right now though, because we don't allow "use"d > symbols and declarations to clash. As I surprisingly discovered when implementing the RFC, they don't clash. The PHP interpreter has a special case where it doesn't warn or throw about the name being in use if the

[PHP-DEV] Re: [RFC] Variable syntax tweaks

2020-01-27 Thread Nikita Popov
On Tue, Jan 7, 2020 at 11:23 AM Nikita Popov wrote: > Hi internals, > > I'd like to propose a small RFC, which addresses a few minor issues that > have not been handled by the original "uniform variable syntax" RFC: > > https://wiki.php.net/rfc/variable_syntax_tweaks > > This is all about edge ca

[PHP-DEV] Re: [RFC] Allow ::class on objects

2020-01-27 Thread Nikita Popov
On Thu, Jan 9, 2020 at 11:27 AM Nikita Popov wrote: > Hi internals, > > Another small RFC, to allow $object::class syntax: > > https://wiki.php.net/rfc/class_name_literal_on_object > > Regards, > Nikita > Heads up: I plan to start voting on this tomorrow. I've resolved the open question re strin

[PHP-DEV] Re: [RFC] Static return type

2020-01-27 Thread Nikita Popov
On Wed, Jan 8, 2020 at 12:42 PM Nikita Popov wrote: > Hi internals, > > I would like to propose the following RFC, which allows using "static" as > a return type: > > https://wiki.php.net/rfc/static_return_type > > While I'm personally not a fan of late static binding, we do support it > and peop

Re: [PHP-DEV] WeakMap vs PECL WeakMap

2020-01-27 Thread Nikita Popov
On Mon, Jan 20, 2020 at 2:58 PM Benjamin Morel wrote: > Hi Internals, > > A year ago, when WeakRef was being proposed, some objections > related to the PECL Weakref > package had lead the RFC > author, J

Re: [PHP-DEV] Union types | true pseudo-type

2020-01-27 Thread Nikita Popov
On Mon, Jan 20, 2020 at 6:30 PM Benjamin Morel wrote: > Hi internals, > > I'd like to bring back the topic of supporting "true" as a type in PHP 8 > union types. > Now that the RFC has been > successfully voted, I'd like to revive the discussion about add

Re: [PHP-DEV] Re: [RFC] "use global functions/consts" statement

2020-01-27 Thread Nicolas Grekas
Le ven. 24 janv. 2020 à 17:10, Nicolas Grekas a écrit : > > One option that I haven't seem much discussion on is the opposite: Always >> only look in the global namespace. Any unimported unqualified usages will >> be treated as fully qualified names. This would match the proposed >> semantics for

Re: [PHP-DEV] [RFC] "use global functions/consts" statement

2020-01-27 Thread Nikita Popov
On Sun, Jan 26, 2020 at 10:37 PM tyson andre wrote: > > and that you have to explicitly say that you use the current namespace > for that name: > > > > > declare(function_and_const_lookup='global'); > > namespace MyNS; > > use function MyNS\foo; > > // or, equivalently: use function namespace\fo

Re: [PHP-DEV] [RFC] Adding a "Stringable" interface to PHP 8

2020-01-27 Thread Nicolas Grekas
Le lun. 27 janv. 2020 à 10:19, Nikita Popov a écrit : > On Wed, Jan 22, 2020 at 4:47 PM Nicolas Grekas < > nicolas.grekas+...@gmail.com> wrote: > >> Hello everyone, >> >> as announced last week, I'm officially opening a discussion for adding a >> "Stringable" interface to PHP 8. >> >> The RFC and

Re: [PHP-DEV] The future of SQLite3 and PDO/SQLite extensions

2020-01-27 Thread Benjamin Morel
> > I think that PDO_SQLite should get the same features as the SQLite3 > extension, and the SQLite3 extension should be deprecated and > eventually removed and replaced by a userland library that would wrap > around the PDO_SQLite API. Hi BohwaZ, Having only PDO_SQLite sounds good to me. Curren

Re: [PHP-DEV] [RFC] Adding a "Stringable" interface to PHP 8

2020-01-27 Thread Nikita Popov
On Wed, Jan 22, 2020 at 4:47 PM Nicolas Grekas wrote: > Hello everyone, > > as announced last week, I'm officially opening a discussion for adding a > "Stringable" interface to PHP 8. > > The RFC and its rationale are presented here as required: > https://wiki.php.net/rfc/stringable > > The patch