Re: [PHP-DEV] Re: The death of `#ifndef FAST_ZPP`?

2016-08-09 Thread Yasuo Ohgaki
Hi Andrea, On Wed, Aug 10, 2016 at 11:23 AM, Andrea Faulds wrote: > 3 months and 6 days on, nobody has responded to this. > > Will these chunks of dead code ever be removed? I've asked the same question before I start eliminating old style parse API. Dimitry said it's designed to optimize heavi

Re: [PHP-DEV] Re: The death of `#ifndef FAST_ZPP`?

2016-08-09 Thread Levi Morrison
On Tue, Aug 9, 2016 at 8:23 PM, Andrea Faulds wrote: > Hi everyone, > > 3 months and 6 days on, nobody has responded to this. > > Will these chunks of dead code ever be removed? > > Thanks! > > > Andrea Faulds wrote: > >> Hi everyone, >> >> You may recall that PHP 7.0 introduced a new API for pro

[PHP-DEV] Re: The death of `#ifndef FAST_ZPP`?

2016-08-09 Thread Andrea Faulds
Hi everyone, 3 months and 6 days on, nobody has responded to this. Will these chunks of dead code ever be removed? Thanks! Andrea Faulds wrote: Hi everyone, You may recall that PHP 7.0 introduced a new API for processing arguments to internal functions, the "Fast Parameter Parsing API" or FA

[PHP-DEV] Re: RFC Posted for str_begins and str_ends functions

2016-08-09 Thread Andrea Faulds
Hi Will, w...@wkhudgins.info wrote: I recently emailed the group about submitting an RFC for str_begins() and str_ends() functions. The RFC has now been officially submitted and is viewable at: https://wiki.php.net/rfc/add_str_begin_and_end_functions I like this RFC, I've long wanted a PHP eq

[PHP-DEV] Re: Method compare()

2016-08-09 Thread Stephen Coakley
On 08/09/2016 12:33 PM, David Rodrigues wrote: Currently PHP has a method called "version_compare()". Should be great if we have the same function but to general usage. There are some implementations on web for that, but I guess that it could be done natively. compare(mixed $a, mixed $b, string

Re: [PHP-DEV] Function auto-loading

2016-08-09 Thread Rowan Collins
On 09/08/2016 18:44, Rasmus Schultz wrote: On Tue, Aug 9, 2016 at 6:17 PM, Rowan Collins wrote: >>In other words, calls to substr() does not trigger the resolve - a >>statement like "use function substr" on the other hand, does. > >Ah, I see. The problem with that is, you still have to explic

Re: [PHP-DEV] Function auto-loading

2016-08-09 Thread Rowan Collins
On 09/08/2016 21:26, Fleshgrinder wrote: An alternative approach could be to auto-load only namespaced things and leave non-namespaced stuff alone. It's not quite as simple as that, as examples have already shown. # file a.php namespace Acme\Foo; function a() { return 'Hello World'; } # f

Re: [PHP-DEV] Method compare()

2016-08-09 Thread Dan Ackroyd
On 9 August 2016 at 19:38, David Rodrigues wrote: > Sara Golemon wrote: >> Anything written in PHP could be written in C, the question you need >> to answer isn't "How?", it's "Why?". > > Sure. > > In general, I just thinking about how it can be useful to ... There are endless number of things th

Re: [PHP-DEV] Function auto-loading

2016-08-09 Thread Fleshgrinder
On 8/9/2016 7:44 PM, Rasmus Schultz wrote: > Well, no - there is still the issue of file names and paths becoming a > dependency, besides issue of having to locate the file in the first > place. > > So there is still very much a purpose to this. > > Importing all classes with use-statements is go

Re: [PHP-DEV] BC break with rand() where min > max

2016-08-09 Thread Christoph M. Becker
On 09.08.2016 at 00:12, Davey Shafik wrote: > I would _very_ much prefer to keep this BC. If we do the right thing, and > there are no repercussions, I'd actually remove the warning. Well, there is already . > If you think > we might want to disallow this in the futu

Re: [PHP-DEV] Method compare()

2016-08-09 Thread David Rodrigues
Sara Golemon wrote: > Anything written in PHP could be written in C, the question you need > to answer isn't "How?", it's "Why?". Sure. In general, I just thinking about how it can be useful to iterate over values on a library itself. Laravel, for instance, have method Collection::where(), but it

Re: [PHP-DEV] Method compare()

2016-08-09 Thread Sara Golemon
On Tue, Aug 9, 2016 at 10:33 AM, David Rodrigues wrote: > Currently PHP has a method called "version_compare()". Should be great > if we have the same function but to general usage. There are some > implementations on web for that, but I guess that it could be done > natively. > Anything written i

Re: [PHP-DEV] Function auto-loading

2016-08-09 Thread Rasmus Schultz
On Tue, Aug 9, 2016 at 6:17 PM, Rowan Collins wrote: >> In other words, calls to substr() does not trigger the resolve - a >> statement like "use function substr" on the other hand, does. > > Ah, I see. The problem with that is, you still have to explicitly list every > function you're going to u

[PHP-DEV] Method compare()

2016-08-09 Thread David Rodrigues
Currently PHP has a method called "version_compare()". Should be great if we have the same function but to general usage. There are some implementations on web for that, but I guess that it could be done natively. > compare(mixed $a, mixed $b, string $operator): boolean Then I could do something

Re: [PHP-DEV] Treats raw types if used as object

2016-08-09 Thread Christoph M. Becker
On 09.08.2016 at 16:17, Rowan Collins wrote: > Right now, there's no concrete plan for if/how/when this might end up a > proper part of the language, though. It might be a good idea to search > one of the archives of this list to see where previous discussions ended > up.

Re: [PHP-DEV] Function auto-loading

2016-08-09 Thread Rowan Collins
On 09/08/2016 17:05, Rasmus Schultz wrote: I'm suggesting the use-statement be the trigger, rather than actually calling the function. In other words, calls to substr() does not trigger the resolve - a statement like "use function substr" on the other hand, does. Ah, I see. The problem with th

Re: [PHP-DEV] Function auto-loading

2016-08-09 Thread Rasmus Schultz
On Tue, Aug 9, 2016 at 12:04 AM, Rowan Collins wrote: > I don't quite follow what you're suggesting here. When does this "function > resolver" get called? I'm suggesting the use-statement be the trigger, rather than actually calling the function. In other words, calls to substr() does not trigg

Re: [PHP-DEV] Treats raw types if used as object

2016-08-09 Thread Rowan Collins
On 09/08/2016 14:49, David Rodrigues wrote: In this case, I suggests to have some handler to treat raw types as objects in an indirect way. Objects are not created, but it methods are called on demand statically. For instance: // It should be declared by PHP internally (default handler). regist

[PHP-DEV] Treats raw types if used as object

2016-08-09 Thread David Rodrigues
I and a friend are thinking about PHP to treats raw types as objects. Currently we have some raw types on PHP, like strings, ints, arrays, etc. Generally we should use some procedural functions to works with this types, for instance, strtolower(string). It works in general, but the most of languag

[PHP-DEV] UGLY Benchmark Results for PHP Master 2016-08-09

2016-08-09 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-08-09 06:26:41+03:00 commit: a5bec3a previous commit:dbf63cb revision date: 2016-08-08 22:33:18+01:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

[PHP-DEV] RFC Karma

2016-08-09 Thread Silvio Marijić
Hi Internals, I would like to create RFC for immutability in PHP which has gone trough couple of discussions, so I need RFC Karma for that. Michal Brzuchalski and I will be authors and we will implement it. Best regards, Silvio Marijic -- Silvio Marijić Software Engineer 2e Systems

Re: [PHP-DEV] Namespaces internal refactoring

2016-08-09 Thread Julien Pauli
On Mon, Aug 8, 2016 at 1:08 PM, Michał Brzuchalski wrote: > Hi internals, > > I would like to present my idea for namespaces refactoring and provide an > RFC for them. > > Currently in PHP namespaces are implemented as a prefix of class or > function name. Using ReflectionClass or ReflectionFuncti

[PHP-DEV] Re: [RFC][VOTE] Session ID without hashing - Vote reopened and restarted

2016-08-09 Thread Yasuo Ohgaki
Hi Christoph, On Tue, Aug 9, 2016 at 12:44 AM, Christoph M. Becker wrote: > > I've just noticed that the voting is still open, although it's already > 2016-08-08. Shouldn't it be closed? Thank you! Closed. -- Yasuo Ohgaki yohg...@ohgaki.net -- PHP Internals - PHP Runtime Development Mailing