[PHP-DEV] BAD Benchmark Results for PHP Master 2017-09-06

2017-09-07 Thread lp_benchmark_robot
Results for project PHP master, build date 2017-09-06 19:24:02-07:00 commit: d254a2c previous commit:dfe0300 revision date: 2017-09-07 00:44:47+02:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

Re: [PHP-DEV] Re: hash_hkdf() signature and return value

2017-09-07 Thread Andrey Andreev
Hi, On Fri, Sep 8, 2017 at 12:32 AM, Yasuo Ohgaki wrote: > > The reason why latter is a lot more secure is related to Andrey's > misunderstanding. > He said "when ikm is cryptographically strong, salt wouldn't add no more > entropy. > so salt does not matter". (not exact

[PHP-DEV] Re: hash_hkdf() signature and return value

2017-09-07 Thread Yasuo Ohgaki
Hi RMs, I suppose nobody can give example(s) that justify current API. I'll leave this issue to RMs decision, since I think this result in no conclusion. Please consider carefully if the current API should be kept or not. I wrote summary for discussion for you. Regards, Misunderstandings

Re: [PHP-DEV] travis issue with libzip

2017-09-07 Thread Nikita Popov
On Thu, Sep 7, 2017 at 3:20 PM, Remi Collet wrote: > Hi > > Can someone who have some travis skill (and ubuntu) can find a way to > have some modern libzip version in travais > > Version 0.10 in trusty is too old for zip extension > Version 0.11 is the minimal supported one >

Re: [PHP-DEV] PHP 7.1.0 to 7.2.0beta2 mt_rand() modulo bias bug

2017-09-07 Thread Solar Designer
On Thu, Sep 07, 2017 at 08:23:22PM +0200, Nikita Popov wrote: > Sorry for the long delay. I've just applied > https://github.com/php/php-src/commit/fd07302024bc47082b13b32217147fd39d1e9e61 > to the 7.2 branch. Thank you! Maybe you'd add similar tests for 64-bit ranges? Right now,

Re: [PHP-DEV] array_filter vs for/foreach usage cost

2017-09-07 Thread Sara Golemon
On Thu, Sep 7, 2017 at 2:13 PM, David Rodrigues wrote: > I understand that array_filter() should costs more than for/foreach because > it is a function call that call another function for each item, while the > for/foreach is a language constructor that works on a way

Re: [PHP-DEV] PHP 7.1.0 to 7.2.0beta2 mt_rand() modulo bias bug

2017-09-07 Thread Nikita Popov
On Wed, Aug 23, 2017 at 10:05 PM, Solar Designer wrote: > On Thu, Aug 17, 2017 at 03:18:30PM +0200, Solar Designer wrote: > > On Thu, Aug 17, 2017 at 12:57:56AM +0200, Nikita Popov wrote: > > > On Thu, Aug 17, 2017 at 12:02 AM, Solar Designer > wrote: > >

[PHP-DEV] array_filter vs for/foreach usage cost

2017-09-07 Thread David Rodrigues
I understand that array_filter() should costs more than for/foreach because it is a function call that call another function for each item, while the for/foreach is a language constructor that works on a way totally different and its optimized for this kind of job. foreach($items as $item) {

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Andreas Treichel
I always assumed that this is the reason why we do this in the first place. I think the main reason was that old versions of ie go into quirksmode if the doctype is not in the first line of the output e.g.: -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Rowan Collins
On 7 September 2017 16:34:38 BST, Michael Morris wrote: > Suppose someone creates a template >wrapper with this circumstance in mind. Instead of doing the obvious, >omit >the final ?> tag in the template, they write code in the template >wrapper >to snip the last endline

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Michael Morris
On Thu, Sep 7, 2017 at 10:23 AM, Andrea Faulds wrote: > What I want to change is how it behaves in other circumstances, i.e. > templating. > > Thanks. > > I get that, but I can think of one example where this innocent change might BC break something. You cite this change being for

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Thomas Hruska
On 9/6/2017 6:45 PM, Andrea Faulds wrote: Hi everyone, This is the tiniest of issues, but it's bugged me for a long time and makes the HTML produced by PHP code less readable than it out to be. Specifically, PHP ignores a newline immediately following a ?> tag. The reason for this is, from

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Christoph M. Becker
On 07.09.2017 at 16:21, Andrea Faulds wrote: > This seems like a reasonable workaround, thank you for the idea. It > reminds me of what PHP's source code does with preprocessor instructions: > > #ifndef FOO > #    define FOO > #endif Hence the name PHP. :) > That said, I still think the ?>

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Andrea Faulds
Hi, Michael Morris wrote: Would anyone object to me changing how PHP handles this so that only the final ?> tag consumes its following newline, and only at the end of the file? Captain Obvious here. It has long been the policy of many large PHP projects to not close the last PHP tag for

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Andrea Faulds
Hi, Christoph M. Becker wrote: On 07.09.2017 at 15:43, Andrea Faulds wrote: Ah. See, it's actually that kind of code that is my problem. A practical example would be: I start the "control flow lines" always on column

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Michael Morris
> > > Would anyone object to me changing how PHP handles this so that only the > final ?> tag consumes its following newline, and only at the end of the > file? > > Captain Obvious here. It has long been the policy of many large PHP projects to not close the last PHP tag for this reason. This

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Christoph M. Becker
On 07.09.2017 at 15:43, Andrea Faulds wrote: > Ah. See, it's actually that kind of code that is my problem. A practical > example would be: > > >     >     >     >     >     >     >     > I start the "control flow lines" always on column 0 (similar

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Andrea Faulds
Hi, Nikita Popov wrote: On Thu, Sep 7, 2017 at 2:43 PM, Andrea Faulds wrote: Hi Nikita, Nikita Popov wrote: It also goes the other way. Whether you want to drop the newline after ?> depends (roughly) on whether the code is control flow (drop) or trailing output (don't drop).

[PHP-DEV] travis issue with libzip

2017-09-07 Thread Remi Collet
Hi Can someone who have some travis skill (and ubuntu) can find a way to have some modern libzip version in travais Version 0.10 in trusty is too old for zip extension Version 0.11 is the minimal supported one Version 1.0.1 in xenial should be ok Thanks, Remi -- PHP Internals - PHP Runtime

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Nikita Popov
On Thu, Sep 7, 2017 at 2:43 PM, Andrea Faulds wrote: > Hi Nikita, > > Nikita Popov wrote: > >> >> It also goes the other way. Whether you want to drop the newline after ?> >> depends (roughly) on whether the code is control flow (drop) or trailing >> output (don't drop). If the

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Andrea Faulds
Hi Nikita, Nikita Popov wrote: It also goes the other way. Whether you want to drop the newline after ?> depends (roughly) on whether the code is control flow (drop) or trailing output (don't drop). If the newline is not dropped anymore it doesn't mean that the output will look nice, it's just

Re: [PHP-DEV] A validator module for PHP7

2017-09-07 Thread Yasuo Ohgaki
Hi Tony, On Thu, Sep 7, 2017 at 5:40 PM, Tony Marston wrote: > "Dan Ackroyd" wrote in message news:CA+kxMuSL1kEW60S7DFJb06+r > 2q3rc1ueewu1jap78fy65aj...@mail.gmail.com... > >> >> On 6 September 2017 at 13:31, Rowan Collins >> wrote: >> >>>

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Nikita Popov
On Thu, Sep 7, 2017 at 12:11 PM, François Laupretre wrote: > Hi Andrea, > > > Le 07/09/2017 à 03:45, Andrea Faulds a écrit : > >> Hi everyone, >> >> This is the tiniest of issues, but it's bugged me for a long time and >> makes the HTML produced by PHP code less readable

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread Nikita Popov
On Thu, Sep 7, 2017 at 3:45 AM, Andrea Faulds wrote: > Hi everyone, > > This is the tiniest of issues, but it's bugged me for a long time and > makes the HTML produced by PHP code less readable than it out to be. > Specifically, PHP ignores a newline immediately following a ?> tag.

Re: [PHP-DEV] Consider only ignoring newlines for final ?> in a file

2017-09-07 Thread François Laupretre
Hi Andrea, Le 07/09/2017 à 03:45, Andrea Faulds a écrit : Hi everyone, This is the tiniest of issues, but it's bugged me for a long time and makes the HTML produced by PHP code less readable than it out to be. Specifically, PHP ignores a newline immediately following a ?> tag. The reason

Re: [PHP-DEV] A validator module for PHP7

2017-09-07 Thread Tony Marston
"Dan Ackroyd" wrote in message news:ca+kxmusl1kew60s7dfjb06+r2q3rc1ueewu1jap78fy65aj...@mail.gmail.com... On 6 September 2017 at 13:31, Rowan Collins wrote: I'm going to assume that the code you posted was something of a straw man, and you're not actually advocating

Re: [PHP-DEV] A validator module for PHP7

2017-09-07 Thread Lester Caine
On 07/09/17 05:26, Yasuo Ohgaki wrote: > As I wrote in README.md, there are only 3 types of inputs. > > 1. Valid data should accepted. > 2. Valid data should accepted, but user's mistake. e.g. Logical error like > your example above. > 3. Invalid. Anything other than 1 and 2 (i.e. Client