Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Dmitry Stogov
On Tue, Mar 3, 2015 at 10:55 PM, Anthony Ferrara wrote: > Dmitry, > > >> So, let's put that to the test, shall we. I compiled and ran the "JIT" > >> compiler (can we please stop calling it that, it's not). > > > > > > This is JIT! > > My apologies. I interpreted your reply to an earlier email tha

Re: [PHP-DEV] Re: Feature request and RFC

2015-03-03 Thread Thomas Gielfeldt
2015-03-02 16:26 GMT+01:00 Rowan Collins : > Rowan Collins wrote on 02/03/2015 10:52: > >> Thomas Gielfeldt wrote on 02/03/2015 07:43: >> >> 2015-02-24 17:17 GMT+01:00 Thomas Gielfeldt : >>> >>> Hi internals. I've made PR proposing a feature request: A new interface Sortable.

Re: [PHP-DEV] Consistent function names

2015-03-03 Thread Yasuo Ohgaki
On Wed, Mar 4, 2015 at 12:34 PM, Yasuo Ohgaki wrote: > (Security should be evaluated by "how difficult to make mistakes", not > "how easy to > fix mistakes" generally. IMHO) > And the consequence of the security breach, of course. -- Yasuo Ohgaki yohg...@ohgaki.net

Re: [PHP-DEV] Consistent function names

2015-03-03 Thread Michael Schuett
So i find this kind of odd since you use err every other place in bz. but this is a minor nitpick. - bz_error → bzerror - bz_error_str → bzerrstr Overall I fell this change would be nice for new people coming to PHP and alienate some long time users. We also run the risk at this point that

Re: [PHP-DEV] Consistent function names

2015-03-03 Thread Yasuo Ohgaki
Hi Michael, On Wed, Mar 4, 2015 at 12:15 PM, Michael Schuett wrote: > Your evaluation is pretty anecdotal. I agree with some points but you need > some solid evidence if you are going to rate these languages. Also do you > have a list of all the functions you would like to rename or is this a >

Re: [PHP-DEV] Consistent function names

2015-03-03 Thread Michael Schuett
Your evaluation is pretty anecdotal. I agree with some points but you need some solid evidence if you are going to rate these languages. Also do you have a list of all the functions you would like to rename or is this a sweeping lets just change everything so it matches and deprecate all the old st

Re: [PHP-DEV] Consistent function names

2015-03-03 Thread Yasuo Ohgaki
Hi Rowan, On Wed, Mar 4, 2015 at 7:12 AM, Rowan Collins wrote: > You are measuring the wrong cost. The cost of adding new names is to > people writing code: > > - additional confusion for new users about why everything has two names > and which they should use > - extra effort for new developers

Re: [PHP-DEV] Consistent function names

2015-03-03 Thread Pierre Joye
On Mar 4, 2015 9:18 AM, "Rowan Collins" wrote: > > On 3 March 2015 20:08:45 GMT, Lester Caine wrote: > >The piece of the jigsaw I am missing is at which point does it become > >better to create a new extension for a complex object rather than > >simply > >writing a set of PHP classes? > > A good

Re: [PHP-DEV] [RFC][DISCUSSION] Constructor behaviour of internal classes

2015-03-03 Thread Yasuo Ohgaki
Hi all, On Tue, Mar 3, 2015 at 4:27 PM, Michael Wallner wrote: > > > >> Do you know of any other case where a `new` operator in an object > >> oriented context can return NULL, except C++ where you have to > >> explicitly ask for that behavior? > > > > I can't say I am familiar with every OO lan

Re: [PHP-DEV] Consistent function names

2015-03-03 Thread Rowan Collins
On 3 March 2015 20:08:45 GMT, Lester Caine wrote: >The piece of the jigsaw I am missing is at which point does it become >better to create a new extension for a complex object rather than >simply >writing a set of PHP classes? A good question, wrappers can achieve a lot here. An extension has two

Re: [PHP-DEV] Consistent function names

2015-03-03 Thread Rowan Collins
On 3 March 2015 18:54:56 GMT, Yasuo Ohgaki wrote: >Hi Rowan, > >On Tue, Mar 3, 2015 at 7:13 PM, Rowan Collins >wrote: > >> Yasuo Ohgaki wrote on 03/03/2015 04:01: >> >>> Hi Lester, >>> >>> On Tue, Mar 3, 2015 at 9:19 AM, Lester Caine >wrote: >>> >>> On 02/03/15 23:54, Yasuo Ohgaki wrote: >

Re: [PHP-DEV] Deprecate array()

2015-03-03 Thread Michael Schuett
Removing array() is purely a stylistic preference and offers no benefit. It does however offer lots of work for people bringing libraries up to date as well as polluting logs. I see no reason to discuss this further unless someone has something concrete. Thanks, On Tue, Mar 3, 2015 at 12:27 PM, A

Re: [PHP-DEV] Consistent function names

2015-03-03 Thread Lester Caine
On 03/03/15 18:54, Yasuo Ohgaki wrote: > More or less, we do need maintenance, otherwise phpversion() will remain > inconsistent forever. IMO. Is there any reason why a few peripheral functions like that can't simply remain as is? ADDING an object with what I will simply describe as 'the new style

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Anthony Ferrara
Dmitry, >> So, let's put that to the test, shall we. I compiled and ran the "JIT" >> compiler (can we please stop calling it that, it's not). > > > This is JIT! My apologies. I interpreted your reply to an earlier email that you were doing all of the code generation at compile time, not at runtim

Re: [PHP-DEV][RFC][DISCUSSION] Strict Argument Count

2015-03-03 Thread Yasuo Ohgaki
Hi Marcio, On Mon, Mar 2, 2015 at 3:07 PM, Marcio Almada wrote: > 2015-03-02 1:43 GMT-03:00 Yasuo Ohgaki : > >> Hi Marcio, >> >> On Mon, Mar 2, 2015 at 8:02 AM, Marcio Almada >> wrote: >> >> I like the idea. >> >> /** fn expects a variable-length argument lists */ >> function fn($arg) { >>

Re: [PHP-DEV] Design by Contract

2015-03-03 Thread Yasuo Ohgaki
Hi Dmitry, On Mon, Mar 2, 2015 at 4:20 PM, Dmitry Stogov wrote: > It may be to late for 7.0. > I feel the same way. It may be better to try add it with 7.x. > Also Alexander liked to to add another proposal, but I saw only > pre-required one(s) > Anyway, it's not a big problem to vote now. >

Re: [PHP-DEV] Consistent function names

2015-03-03 Thread Yasuo Ohgaki
Hi Rowan, On Tue, Mar 3, 2015 at 7:13 PM, Rowan Collins wrote: > Yasuo Ohgaki wrote on 03/03/2015 04:01: > >> Hi Lester, >> >> On Tue, Mar 3, 2015 at 9:19 AM, Lester Caine wrote: >> >> On 02/03/15 23:54, Yasuo Ohgaki wrote: >>> This looks awful... just cannot put up with... >>> Rasmu

Re: [PHP-DEV] Re: Bug #69127 session_regenerate_id(true) randomly generates a warning and loses session data

2015-03-03 Thread Yasuo Ohgaki
Hi Andrey, On Tue, Mar 3, 2015 at 7:40 PM, Andrey Andreev wrote: > Why do you want to change it at all? If you don't want the data to get > immediately deleted, pass FALSE to the function and let the GC erase > it later. > It's not precise at all. Old session data that must be deleted could exi

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Zeev Suraski
> On 3 במרץ 2015, at 19:17, Dmitry Stogov wrote: > > > >> On Tue, Mar 3, 2015 at 6:57 PM, Zeev Suraski wrote: >> > -Original Message- >> > From: Anthony Ferrara [mailto:ircmax...@gmail.com] >> > Sent: Tuesday, March 03, 2015 5:44 PM >> > To: Zeev Suraski >> > Cc: PHP Internals >> > Su

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Zeev Suraski
> On 3 במרץ 2015, at 19:08, Anthony Ferrara wrote: > > Zeev, > > On Tue, Mar 3, 2015 at 11:32 AM, Zeev Suraski wrote: >>> It wins on uneven ground. >> >> Without the output buffering code it's a LOT more uneven, as the PHP version >> is flushing every byte - approx. 6,000 such flushes. > > T

[PHP-DEV] Re: [RFC] [DISCUSSION] Consistent Function Names

2015-03-03 Thread Benoit Schildknecht
Hi, I think the new functions must have consistent parameters order too. I think it is about the right time, so we'll have a cleaner and more logical language. ATM, it's a real headache, we constantly have to read the documentation to make sure we give the arguments in the right order.

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Anthony Ferrara
Zeev, On Tue, Mar 3, 2015 at 11:32 AM, Zeev Suraski wrote: >> It wins on uneven ground. > > Without the output buffering code it's a LOT more uneven, as the PHP version > is flushing every byte - approx. 6,000 such flushes. Then the benchmark should suffer because of that. You're testing the ful

Re: [PHP-DEV] Deprecate array()

2015-03-03 Thread Andrey Hristov
On 3.03.2015 19:10, Adrian Parker wrote: Seeing it makes me vomit, IMHO. Great introduction! This is just a proposal, I know next to nothing about core PHP development. https://www.simonholywell.com/post/2010/09/15-excellent-resources-for-php-extension-development.html Enjoy! Regard

Re: [PHP-DEV] Deprecate array()

2015-03-03 Thread Mike Willbanks
On Tue, Mar 3, 2015 at 11:10 AM, Adrian Parker < i.am.hidden.somewh...@gmail.com> wrote: > Seeing it makes me vomit, IMHO. > Seeing $var = [] makes me vomit, IMHO. > > This is just a proposal, I know next to nothing about core PHP development. > On a serious note, this would never happen. The

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Dmitry Stogov
On Tue, Mar 3, 2015 at 6:57 PM, Zeev Suraski wrote: > > -Original Message- > > From: Anthony Ferrara [mailto:ircmax...@gmail.com] > > Sent: Tuesday, March 03, 2015 5:44 PM > > To: Zeev Suraski > > Cc: PHP Internals > > Subject: Re: [PHP-DEV] Re: Zend JIT Open Sourced > > > > Zeev, > > > >

[PHP-DEV] Deprecate array()

2015-03-03 Thread Adrian Parker
Seeing it makes me vomit, IMHO. This is just a proposal, I know next to nothing about core PHP development. Regards, Adrian

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Dmitry Stogov
On Tue, Mar 3, 2015 at 6:44 PM, Anthony Ferrara wrote: > Zeev, > > On Tue, Mar 3, 2015 at 8:05 AM, Zeev Suraski wrote: > >> So I do apologize to the person. I don't to the code. > > > > I wanted to verify whether my gut was correct (minimal amount of output, > and > > stdout is in fact buffered

AW: [PHP-DEV] [RFC] Anonymous Classes

2015-03-03 Thread Robert Stoll
Hi Philip > -Ursprüngliche Nachricht- > Von: Philip Sturgeon [mailto:pjsturg...@gmail.com] > Gesendet: Dienstag, 24. Februar 2015 14:52 > An: PHP Internals > Betreff: [PHP-DEV] [RFC] Anonymous Classes > > Good day! > > https://wiki.php.net/rfc/anonymous_classes > > There's a little RFC

RE: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Zeev Suraski
> It wins on uneven ground. Without the output buffering code it's a LOT more uneven, as the PHP version is flushing every byte - approx. 6,000 such flushes. > Which was the very initial point that I > made. One writes to interactive output within the loop (even if > buffered, it's flushed 69 tim

Re: [PHP-DEV] [RFC][Discussion] Parser extension API

2015-03-03 Thread Leigh
On 3 March 2015 at 11:56, Alexander Lisachenko wrote: > Good morning! > > I have cleaned https://wiki.php.net/rfc/parser-extension-api and restricted > it's scope only to the parsing API. Extension API can be implemented later +1 > on top of > https://github.com/php/php-src/commit/1010b0ea4f4b9f

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Anthony Ferrara
Zeev, On Tue, Mar 3, 2015 at 10:57 AM, Zeev Suraski wrote: >> -Original Message- >> From: Anthony Ferrara [mailto:ircmax...@gmail.com] >> Sent: Tuesday, March 03, 2015 5:44 PM >> To: Zeev Suraski >> Cc: PHP Internals >> Subject: Re: [PHP-DEV] Re: Zend JIT Open Sourced >> >> Zeev, >> >> On

RE: [PHP-DEV] Re: About optimization for compiler

2015-03-03 Thread Zeev Suraski
> -Original Message- > From: Anthony Ferrara [mailto:ircmax...@gmail.com] > Sent: Tuesday, March 03, 2015 5:50 PM > To: Zeev Suraski > Cc: Julien Pauli; PHP internals > Subject: Re: [PHP-DEV] Re: About optimization for compiler > > Zeev, > > >> I agree with that as well, just Anthony gave a

RE: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Zeev Suraski
> -Original Message- > From: Anthony Ferrara [mailto:ircmax...@gmail.com] > Sent: Tuesday, March 03, 2015 5:44 PM > To: Zeev Suraski > Cc: PHP Internals > Subject: Re: [PHP-DEV] Re: Zend JIT Open Sourced > > Zeev, > > On Tue, Mar 3, 2015 at 8:05 AM, Zeev Suraski wrote: > >> So I do apologi

Re: [PHP-DEV] Re: About optimization for compiler

2015-03-03 Thread Anthony Ferrara
Zeev, >> I agree with that as well, just Anthony gave a different opinion which >> seems >> right as well. > > I think that if we ever have optimization passes that are prohibitively > expensive to run interactively (most probably around JIT) we'll definitely > need new strategies for them. But a

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Anthony Ferrara
Zeev, On Tue, Mar 3, 2015 at 8:05 AM, Zeev Suraski wrote: >> So I do apologize to the person. I don't to the code. > > I wanted to verify whether my gut was correct (minimal amount of output, and > stdout is in fact buffered - output shouldn't move the needle) and asked > Dmitry to rerun the C te

RE: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Zeev Suraski
> -Original Message- > From: julienpa...@gmail.com [mailto:julienpa...@gmail.com] On Behalf Of > Julien Pauli > Sent: Tuesday, March 03, 2015 5:11 PM > To: Zeev Suraski > Cc: Anthony Ferrara; PHP Internals > Subject: Re: [PHP-DEV] Re: Zend JIT Open Sourced > > On Tue, Mar 3, 2015 at 2:05 PM

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Julien Pauli
On Tue, Mar 3, 2015 at 2:05 PM, Zeev Suraski wrote: > > So I do apologize to the person. I don't to the code. > > I wanted to verify whether my gut was correct (minimal amount of output, > and > stdout is in fact buffered - output shouldn't move the needle) and asked > Dmitry to rerun the C test

RE: [PHP-DEV] Re: About optimization for compiler

2015-03-03 Thread Zeev Suraski
> -Original Message- > From: julienpa...@gmail.com [mailto:julienpa...@gmail.com] On Behalf Of > Julien Pauli > Sent: Tuesday, March 03, 2015 4:44 PM > To: Zeev Suraski > Cc: PHP internals > Subject: Re: [PHP-DEV] Re: About optimization for compiler > > I'm looking at https://github.com/zen

Re: [PHP-DEV] Re: About optimization for compiler

2015-03-03 Thread Rowan Collins
Julien Pauli wrote on 03/03/2015 14:43: It's a bit OT, but can you explain what you mean here? OPcache works with >the current master (PHP 7), and actually, OPcache worked with phpng all >along and definitely since it was merged into master... It's been >integrated to the php-src tree since it

Re: [PHP-DEV] Re: About optimization for compiler

2015-03-03 Thread Julien Pauli
On Tue, Mar 3, 2015 at 2:52 PM, Zeev Suraski wrote: > > -Original Message- > > From: julienpa...@gmail.com [mailto:julienpa...@gmail.com] On Behalf Of > > Julien Pauli > > Sent: Monday, March 02, 2015 9:07 PM > > To: Dmitry Stogov > > Cc: Bob Weinand; Xinchen Hui; PHP Internals > > Subjec

RE: [PHP-DEV] Re: About optimization for compiler

2015-03-03 Thread Zeev Suraski
> -Original Message- > From: julienpa...@gmail.com [mailto:julienpa...@gmail.com] On Behalf Of > Julien Pauli > Sent: Monday, March 02, 2015 9:07 PM > To: Dmitry Stogov > Cc: Bob Weinand; Xinchen Hui; PHP Internals > Subject: Re: [PHP-DEV] Re: About optimization for compiler > > As OPCache

Re: [PHP-DEV] [RFC Discuss] Generator Delegation

2015-03-03 Thread Rowan Collins
Niklas Keller wrote on 03/03/2015 12:52: 2015-03-03 13:27 GMT+01:00 Rowan Collins >: Bob Weinand wrote on 03/03/2015 12:08: Why should the word "return" be unique to methods or functions? It just doesn't feel like the same thing as a return valu

RE: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Zeev Suraski
> So I do apologize to the person. I don't to the code. I wanted to verify whether my gut was correct (minimal amount of output, and stdout is in fact buffered - output shouldn't move the needle) and asked Dmitry to rerun the C test on the same system, but this time with the output code completely

Re: [PHP-DEV] [RFC Discuss] Generator Delegation

2015-03-03 Thread Niklas Keller
2015-03-03 13:27 GMT+01:00 Rowan Collins : > Bob Weinand wrote on 03/03/2015 12:08: > > Am 03.03.2015 um 12:34 schrieb Rowan Collins : >>> >>> Niklas Keller wrote on 03/03/2015 10:55: >>> Gr, top-posting... Sorry, was on mobile. ;-) However, since the existen

Re: [PHP-DEV] Re: About optimization for compiler

2015-03-03 Thread Julien Pauli
On Mon, Mar 2, 2015 at 9:47 PM, Anthony Ferrara wrote: > Julien, > > > > Bob's code optimizes things by adding a new OPCode. > > This is different from compiler optimizations. > > > > Compiler optimizations are about changing native, supported OPCode > > structures to other native supported OPCod

Re: [PHP-DEV] [RFC Discuss] Generator Delegation

2015-03-03 Thread Rowan Collins
Bob Weinand wrote on 03/03/2015 12:08: Am 03.03.2015 um 12:34 schrieb Rowan Collins : Niklas Keller wrote on 03/03/2015 10:55: Gr, top-posting... Sorry, was on mobile. ;-) However, since the existence of the word "yield" is the only thing that marks a coroutine now, how about

Re: [PHP-DEV] [RFC Discuss] Generator Delegation

2015-03-03 Thread Bob Weinand
> Am 03.03.2015 um 12:34 schrieb Rowan Collins : > > Niklas Keller wrote on 03/03/2015 10:55: >> >>Gr, top-posting... >> >> >> Sorry, was on mobile. ;-) >> >>However, since the existence of the word "yield" is the only thing >>that >>marks a coroutine now, how about using a va

Re: [PHP-DEV] [RFC][Discussion] Parser extension API

2015-03-03 Thread Alexander Lisachenko
Good morning! I have cleaned https://wiki.php.net/rfc/parser-extension-api and restricted it's scope only to the parsing API. Extension API can be implemented later on top of https://github.com/php/php-src/commit/1010b0ea4f4b9f96ae744f04c1191ac228580e48 and current implementation, because it requi

Re: [PHP-DEV] [RFC Discuss] Generator Delegation

2015-03-03 Thread Niklas Keller
2015-03-03 12:34 GMT+01:00 Rowan Collins : > > Niklas Keller wrote on 03/03/2015 10:55: >> >> Gr, top-posting... > > > Sorry, was on mobile. ;-) > >> However, since the existence of the word "yield" is the only thing that >> marks a coroutine now, how about using a variant of that for the final >>

Re: [PHP-DEV] [RFC Discuss] Generator Delegation

2015-03-03 Thread Rowan Collins
Niklas Keller wrote on 03/03/2015 10:55: Gr, top-posting... Sorry, was on mobile. ;-) However, since the existence of the word "yield" is the only thing that marks a coroutine now, how about using a variant of that for the final value, e.g. "yield final $foo"? What's the

Re: [PHP-DEV] [RFC Discuss] Generator Delegation

2015-03-03 Thread Niklas Keller
> > Gr, top-posting... Sorry, was on mobile. ;-) However, since the existence of the word "yield" is the only thing that > marks a coroutine now, how about using a variant of that for the final > value, e.g. "yield final $foo"? What's the final value? The last "yield"ed value or a return? Ju

Re: [PHP-DEV] Re: Bug #69127 session_regenerate_id(true) randomly generates a warning and loses session data

2015-03-03 Thread Andrey Andreev
Hi, On Tue, Mar 3, 2015 at 9:25 AM, Yasuo Ohgaki wrote: > Hi all, > > On Sun, Mar 1, 2015 at 1:53 PM, Yasuo Ohgaki wrote: > >> >> >> https://bugs.php.net/bug.php?id=69127 >> >> This bug is known fatal bug for session module. I proposed "lazy_destroy" >> to fix >> this before, but it declined. >>

Re: [PHP-DEV] [Disccusion] Introduce error_clear_last() function

2015-03-03 Thread Julien Pauli
On Tue, Mar 3, 2015 at 11:13 AM, reeze wrote: > Hi internals, > > I would like to implement FR #45235. below copied from Github. > > What do you think about it? > > I had the same idea and I even got a patch somewhere. I'm +1 and should merge your idea soon, if nobody rejects the idea. PS : we c

Re: [PHP-DEV] Consistent function names

2015-03-03 Thread Rowan Collins
Yasuo Ohgaki wrote on 03/03/2015 04:01: Hi Lester, On Tue, Mar 3, 2015 at 9:19 AM, Lester Caine wrote: On 02/03/15 23:54, Yasuo Ohgaki wrote: This looks awful... just cannot put up with... Rasmus has already answered, but are you prposing to rewrite -> http://www.gnu.org/software/gettext/ma

[PHP-DEV] [Disccusion] Introduce error_clear_last() function

2015-03-03 Thread reeze
Hi internals, I would like to implement FR #45235. below copied from Github. What do you think about it? - You can view the Pull Request on github: https://github.com/php/php-src/pull/1135 Pull Request Description: In PHP a simple assign expression would raise error, if user use error_get_l

Re: [PHP-DEV] Reclassify E_STRICT notices

2015-03-03 Thread Nikita Popov
On Mon, Mar 2, 2015 at 7:37 PM, Stanislav Malyshev wrote: > Hi! > > > About the accessing static property non statically, I would have thrown > an > > E_ERROR : the property simply doesn't exist. Class properties should be > > accessed using the class, not an instance of it , IMO. > > Sometimes,

Re: [PHP-DEV] [RFC Discuss] Generator Delegation

2015-03-03 Thread Rowan Collins
On 2 March 2015 at 21:24, Daniel Lowrey wrote: > Rowan Collins wrote on 02/03/2015 14:44: > > > Could you explain a bit more about how the generator return > > functionality is necessary for this? It seems to me like it's still just > > a "nice to have", and that the main functionality - delegati

[PHP-DEV] OO the PHP way ...

2015-03-03 Thread Lester Caine
One proposal that is being presented in several guises is the idea of scalar objects with a clean interface to use those objects. This allows a complete new API without needing to touch any of the 'legacy' system names. Introduce a graphics interface as an object as an alternative to gd and the lik