Re: [PHP-DEV] [RFC][DISCUSSION] debug_backtrace alternative as an array of StackFrame objects

2020-07-08 Thread Levi Morrison via internals
On Tue, Jul 7, 2020 at 2:47 PM Michał Marcin Brzuchalski wrote: > > Hi internals, > > following recently added alternative to `token_get_all()` in form of a > dedicated class `PhpToken` > I've made a similar proposal for collecting stack traces by introducing > `StackFrame::getTrace()` > and

Re: [PHP-DEV] [RFC][DISCUSSION] debug_backtrace alternative as an array of StackFrame objects

2020-07-08 Thread Mike Schinkel
> On Jul 7, 2020, at 4:46 PM, Michał Marcin Brzuchalski > wrote: > > Hi internals, > > following recently added alternative to `token_get_all()` in form of a > dedicated class `PhpToken` > I've made a similar proposal for collecting stack traces by introducing > `StackFrame::getTrace()` > and

[PHP-DEV] Re: [RFC] [VOTE] Make constructors and destructors return void

2020-07-08 Thread Benas IML
Hey internals, I have reopened the voting. It is going to close July 22nd, 2020. I have also added a "Why allow void return type on constructors/destructors?" section which I hope internals are going to read and consider before voting. Thanks! RFC: https://wiki.php.net/rfc/make_ctor_ret_void

Re: [PHP-DEV] [CONCEPT][DISCUSSION] Instance as boolean

2020-07-08 Thread Marcio Almada
Hello Josh, > Link to working draft: https://bit.ly/php-0001 >From a type safety POV I'd prefer to have an interface available, the same way we did to the Stringable interface RFC. But I'd rather keep these engine affecting behaviors with the same magic method naming

[PHP-DEV] [CONCEPT][DISCUSSION] Instance as boolean

2020-07-08 Thread Josh Bruce
Link to working draft: https://bit.ly/php-0001 Discussion on implementing a means by which a class instance can interacted with syntactically as a boolean. At this point in the discuss the only means discussed is creation of a method (magic or via an interface).

Re: [PHP-DEV] [RFC] \PHP namespace usage heuristics

2020-07-08 Thread Larry Garfield
On Tue, Jul 7, 2020, at 5:31 PM, David Rodrigues wrote: > There are some problem by using double back slash for PHP namespace? > > Eg. Instead of \PHP\String be just \\String. Currently that's a syntax error, and I don't think we have time to change it before the code freeze even if we could

Re: [PHP-DEV] Proposal: A way for classes to define a response to any primitive type cast

2020-07-08 Thread Josh Bruce
 > On Jul 7, 2020, at 3:24 PM, Rowan Tommins wrote: > >> On 07/07/2020 18:13, Josh Bruce wrote: >> Decided to put something >> together:https://github.com/joshbruce/external-project-proposals/blob/master/php-concepts/interact-with-instance-as-php.md > > > Hi Josh, > > Reading through this,

Re: [PHP-DEV] Re: [RFC] Nullsafe operator

2020-07-08 Thread Ilija Tovilo
> Just curious, do you plan on putting this to a vote in near time? The > feature freeze is coming soon. There's a remaining complication with references which I had limited time to work on. This doesn't technically need to be fixed to start the vote but if it can't be solved reasonably it would

Re: [PHP-DEV] Re: [RFC] Nullsafe operator

2020-07-08 Thread someniatko
> I've reworded some things and added more information on short > circuiting. Functionality wise the RFC has remained the same. > > Since there was little negative feedback I'd like to put this feature > to a vote in ~1 week. If you have any concerns or criticism please let > me know in time.

Re: [PHP-DEV] Proposal: A way for classes to define a response to any primitive type cast

2020-07-08 Thread someniatko
> This would seem to fit your use case with Shoop quite well: > rather than Shoop::array($array)->first()->unfold(), you would just call > $array->first(). It's fairly high on a lot of people's wish lists, but > there's a lot of details to get right in both design and implementation, > so I

Re: [PHP-DEV] [RFC] \PHP namespace usage heuristics

2020-07-08 Thread Stephen Reay
> On 8 Jul 2020, at 13:16, Michał Marcin Brzuchalski > wrote: > > Hi Stephen, > > śr., 8 lip 2020 o 07:09 Stephen Reay napisał(a): > >> ... >> IMO (and I know it’s not universal) acronyms should remain upper case. >> Camel case is about upper casing the first letter of each word. The

Re: [PHP-DEV] [RFC] \PHP namespace usage heuristics

2020-07-08 Thread Michał Marcin Brzuchalski
Hi Stephen, śr., 8 lip 2020 o 07:09 Stephen Reay napisał(a): > ... > IMO (and I know it’s not universal) acronyms should remain upper case. > Camel case is about upper casing the first letter of each word. The letters > of an acronym are all the first letters of words, thus DOM not Dom, etc. >