Re: [PHP-DEV] Revive Number Format Separator RFC

2019-04-27 Thread Stanislav Malyshev
Hi! > A cursory scan of current usage suggests that number format separator might > be used in scenarios such as: > > Phone numbers > 919_555_1234 > 49_89_636_48018 Just noting here that using integers as phone numbers is not something we want to support, enable or promote. > Date time values >

Re: [PHP-DEV] Symbol implementation

2019-04-27 Thread Dan Ackroyd
On Sat, 27 Apr 2019 at 22:05, Bruce Weirdan wrote: > > On Sat, Apr 27, 2019 at 11:57 PM Dan Ackroyd wrote: > > > > typehint > > > > Please could people stop using that word. PHP's type system for > > parameters and return values are actual types, not just hints. > > People use the term PHP itself

Re: [PHP-DEV] Symbol implementation

2019-04-27 Thread Bruce Weirdan
On Sat, Apr 27, 2019 at 11:57 PM Dan Ackroyd wrote: > > typehint > > Please could people stop using that word. PHP's type system for > parameters and return values are actual types, not just hints. People use the term PHP itself uses: https://www.php.net/results.php?q=typehint&l=en&p=all --

Re: [PHP-DEV] Symbol implementation

2019-04-27 Thread Dan Ackroyd
On Sat, 27 Apr 2019 at 20:37, David Rodrigues wrote: > > ES6 supports the Symbol type that is a replacement to hard-coded > identifiers where it are not really need. This seems quite similar to the idea of enums. That Levi and Bob might have been working on: https://wiki.php.net/rfc/enum > typeh

Re: [PHP-DEV] Retiring PHP's Mirror Program

2019-04-27 Thread Peter Kokot
Hello, On Mon, 1 Apr 2019 at 16:26, Robert Hickman wrote: > > Is there any reason not to use 'php.net' raw without the 'www'? > Additional question: Can we maybe get an insight of a canonical, recommended URL which should be used now? Is this www.php.,net or is it php.net without www. Worth not

[PHP-DEV] Symbol implementation

2019-04-27 Thread David Rodrigues
ES6 supports the Symbol type that is a replacement to hard-coded identifiers where it are not really need. I like to suggests a similar feature to PHP. #0: it should be a partial class that could not be instantiated (new symbol should be invalid, like an abstract class). In this point I should s

[PHP-DEV] TCO: Tail Call Optimization

2019-04-27 Thread David Rodrigues
Not long ago I heard about the Tail Call Optimization from ES6. It seemed obscure to me at first, but once I understood the benefit of having it, it seemed like a good idea of optimization for PHP to avoid recursion problems. Is there any plan to make it possible in the engine? -- David Rodrigues

[PHP-DEV] Re: [discussion] arraykey type

2019-04-27 Thread Dan Ackroyd
On Sat, 27 Apr 2019 at 00:13, azjezz wrote: > > What do you think about adding the `arraykey` type to PHP. I don't think we should be adding anything to PHP core unless: * there is a strong case for it being needed. * we're sure it's not going to cause problems in the future. * it's clearly the

Re: [PHP-DEV] Revive Number Format Separator RFC

2019-04-27 Thread Rowan Collins
On 27 April 2019 13:51:11 BST, Lester Caine wrote: >On 27/04/2019 13:37, Rowan Collins wrote: >> The only way I've seen dates stored as integers is as a number of >> seconds / milliseconds / whatever since some epoch, most commonly >> seconds since 1970-01-01 00:00:00 UTC > >Use of a days count

Re: [PHP-DEV] Revive Number Format Separator RFC

2019-04-27 Thread Lester Caine
On 27/04/2019 13:37, Rowan Collins wrote: The only way I've seen dates stored as integers is as a number of seconds / milliseconds / whatever since some epoch, most commonly seconds since 1970-01-01 00:00:00 UTC Use of a days count rather than a seconds count makes dates a lot easier to work

Re: [PHP-DEV] Revive Number Format Separator RFC

2019-04-27 Thread Rowan Collins
On 27/04/2019 12:18, Thomas Punt wrote: Storing dates in an integer format can be a valid use case if performance is a concern. It is far faster and more compact to store and compare integer-based dates than using objects for everything. The only way I've seen dates stored as integers is as

Re: [PHP-DEV] Revive Number Format Separator RFC

2019-04-27 Thread Thomas Punt
Hi! > On Fri, Apr 26, 2019 at 4:30 PM Theodore Brown wrote: > > > On Fri, Apr 26, 2019 at 6:10 AM Rowan Collins > > wrote: > > > > I'm not particularly against this proposal, but I'm not sure how often I'd > > use it. > > How often you use numeric separators depends on what you are doing. > I d