Re: [PHP-DEV] Re: [RFC] Debugging PDO Prepared Statement Emulation

2016-10-24 Thread Lester Caine
On 24/10/16 21:16, Adam Baratz wrote: >> I've created an RFC to make it easier to work with emulated prepared >> > statements: >> > https://wiki.php.net/rfc/debugging_pdo_prepared_statement_emulation >> > > Does anyone have feedback? Since PDO is an interface to third party databases this seems

Re: [PHP-DEV] header() removes all header of the same name.

2016-10-24 Thread Yasuo Ohgaki
Hi all, I didn't answer this question and would like to make my point of view clear. On Thu, Oct 20, 2016 at 9:41 PM, Stephen Reay wrote: > Why is your concern so focussed on solving problems for inexperienced > developers, who are effectively using functions

Re: [PHP-DEV] strtod and NaN vs. zero

2016-10-24 Thread Marc Bennewitz
Hi Andrea, Am 24.10.2016 um 15:40 schrieb Andrea Faulds: Hi, Marc Bennewitz wrote: But I'm still curious why casting any non numeric string results in the valid number float(0) where there is a special value in floating point numbers declared to represent not a number values. Because

[PHP-DEV] Re: [RFC] Debugging PDO Prepared Statement Emulation

2016-10-24 Thread Adam Baratz
> > I've created an RFC to make it easier to work with emulated prepared > statements: > https://wiki.php.net/rfc/debugging_pdo_prepared_statement_emulation > Does anyone have feedback?

Re: [PHP-DEV] Debugging with zero cost in production

2016-10-24 Thread Niklas Keller
2016-10-24 19:12 GMT+02:00 Fleshgrinder : > On 10/24/2016 7:10 PM, David Rodrigues wrote: > > Hello, folks. > > > > I'm thinking about a debug function to allow us to create "zero cost > > declarations" in production code, as assert() does. > > > > From what I understand,

Re: [PHP-DEV] Debugging with zero cost in production

2016-10-24 Thread Fleshgrinder
On 10/24/2016 7:10 PM, David Rodrigues wrote: > Hello, folks. > > I'm thinking about a debug function to allow us to create "zero cost > declarations" in production code, as assert() does. > > From what I understand, if I have something like assert(method()), > method() will not be called in

[PHP-DEV] Debugging with zero cost in production

2016-10-24 Thread David Rodrigues
Hello, folks. I'm thinking about a debug function to allow us to create "zero cost declarations" in production code, as assert() does. >From what I understand, if I have something like assert(method()), method() will not be called in production, only in development. This behaviour is great

Re: [PHP-DEV] Security issue handling

2016-10-24 Thread Kalle Sommer Nielsen
2016-10-24 17:19 GMT+02:00 Rasmus Lerdorf : > As a first step perhaps we just need to expand security@ a bit with the > specific call for volunteers to help review security patches? Maybe we should make the security issues available to those who actively contributes to PHP,

Re: [PHP-DEV] Security issue handling

2016-10-24 Thread Christoph M. Becker
On 24.10.2016 at 17:19, Rasmus Lerdorf wrote: >>> c. Get some specific people to volunteer to review patches in security >>> repo regularly - how? Any takers? >>> >> OFC it'd be ideal to have some karma holders to participate. And another >> option, which is IMHO eligible - we could invite

Re: [PHP-DEV] Security issue handling

2016-10-24 Thread Jakub Zelenka
On Mon, Oct 24, 2016 at 4:19 PM, Rasmus Lerdorf wrote: > > > > > c. Get some specific people to volunteer to review patches in security > > > repo regularly - how? Any takers? > > > > > OFC it'd be ideal to have some karma holders to participate. And another > > option, which

Re: [PHP-DEV] Security issue handling

2016-10-24 Thread Rasmus Lerdorf
> > > c. Get some specific people to volunteer to review patches in security > > repo regularly - how? Any takers? > > > OFC it'd be ideal to have some karma holders to participate. And another > option, which is IMHO eligible - we could invite several reporters. There > is already a couple of

RE: [PHP-DEV] Security issue handling

2016-10-24 Thread Anatol Belski
Hi Stas, Thanks for bringing this up. > -Original Message- > From: Stanislav Malyshev [mailto:smalys...@gmail.com] > Sent: Monday, October 24, 2016 7:16 AM > To: PHP Internals > Subject: [PHP-DEV] Security issue handling > > Hi! > > I'd like to discuss an

RE: [PHP-DEV] bug classification discussion

2016-10-24 Thread Anatol Belski
> -Original Message- > From: Anatol Belski [mailto:anatol@belski.net] > Sent: Monday, October 24, 2016 3:45 PM > To: 'Stanislav Malyshev' ; 'PHP Internals' > > Cc: 'Remi Collet' > Subject: RE: [PHP-DEV] bug

RE: [PHP-DEV] strtod and NaN vs. zero

2016-10-24 Thread Anatol Belski
Hi Marc, > -Original Message- > From: Marc Bennewitz [mailto:dev@mabe.berlin] > Sent: Sunday, October 23, 2016 12:56 PM > To: PHP Internals List > Subject: [PHP-DEV] strtod and NaN vs. zero > > Hi internals, > > On casting a non numeric value to a float in PHP

[PHP-DEV] Re: [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Andrea Faulds
Hi, Michał Brzuchalski wrote: I would like to initiate discussion for Object typehint RFC https://wiki.php.net/rfc/object-typehint I like this proposal. We already have an object type internally for the same reasons (functions acting on a generic object), so it makes sense to extend this to

RE: [PHP-DEV] bug classification discussion

2016-10-24 Thread Anatol Belski
Hi Stas, > -Original Message- > From: Stanislav Malyshev [mailto:smalys...@gmail.com] > Sent: Monday, October 24, 2016 7:23 AM > To: PHP Internals > Cc: Remi Collet > Subject: [PHP-DEV] bug classification discussion > > Hi! > > We have

Re: [PHP-DEV] strtod and NaN vs. zero

2016-10-24 Thread Andrea Faulds
Hi, Marc Bennewitz wrote: But I'm still curious why casting any non numeric string results in the valid number float(0) where there is a special value in floating point numbers declared to represent not a number values. Because that's what C's strtod() does, and it's also what (int) does

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Bishop Bettini
On Oct 24, 2016 6:17 AM, "Dan Ackroyd" wrote: > > But I don't see how this RFC 'encourages' what you consider to be a bad practice. Instead it provides a useful thing that could be misused by bad programmers. To clarify, programmers are not 'bad'. Their implementation

[PHP-DEV] BAD Benchmark Results for PHP Master 2016-10-24

2016-10-24 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-10-24 06:24:49+03:00 commit: b551c30 previous commit:6c867cb revision date: 2016-10-23 22:27:25+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] [RFC] Convert numeric keys in object/array casts

2016-10-24 Thread Andrea Faulds
Hi Stas, Stanislav Malyshev wrote: How common is this problem? It looks like an edge case of an edge case (converting objects to arrays as such is not a very frequent operation, and the reverse is even less frequent) but adds performance hit on the common case. The confusion of string key

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Dan Ackroyd
> On 24 Oct 2016, at 07:45, Michael Morris wrote: > > My principle worry with this RFC is it encourages an anti-pattern - not > using interfaces and thereby not clearly labeling what objects can and > cannot do. > You've stated that as fact without any supporting argument,

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Marco Pivetta
Hi Michal! First of all, many thanks to you and Dan for pushing this forward. It is indeed a very needed and long due addition to the engine. I just wanted to clear up the use-case scenarios for everyone in here that keeps stating that this will lead to bad code. It is very unlikely to type-hint

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Michał Brzuchalski
2016-10-24 9:42 GMT+02:00 Michael Morris : > On Mon, Oct 24, 2016 at 3:21 AM, Michał Brzuchalski < > mic...@brzuchalski.com> > wrote: > > > > > > > 2016-10-24 8:45 GMT+02:00 Michael Morris : > > > >> On Sun, Oct 23, 2016 at 3:39 AM, Michał Brzuchalski < >

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Michael Morris
On Mon, Oct 24, 2016 at 3:21 AM, Michał Brzuchalski wrote: > > > 2016-10-24 8:45 GMT+02:00 Michael Morris : > >> On Sun, Oct 23, 2016 at 3:39 AM, Michał Brzuchalski < >> mic...@brzuchalski.com> >> wrote: >> >> >>

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Michał Brzuchalski
2016-10-24 8:45 GMT+02:00 Michael Morris : > On Sun, Oct 23, 2016 at 3:39 AM, Michał Brzuchalski < > mic...@brzuchalski.com> > wrote: > > > Hi all, > > > > I would like to initiate discussion for Object typehint RFC > > https://wiki.php.net/rfc/object-typehint > > > > This

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Markus Fischer
Hi, On 23.10.16 09:39, Michał Brzuchalski wrote: > I would like to initiate discussion for Object typehint RFC > https://wiki.php.net/rfc/object-typehint > > This feature is developed to provide missing functionality which is needed > and quite easy to introduce. > There are many people which

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Michael Morris
On Sun, Oct 23, 2016 at 3:39 AM, Michał Brzuchalski wrote: > Hi all, > > I would like to initiate discussion for Object typehint RFC > https://wiki.php.net/rfc/object-typehint > > This feature is developed to provide missing functionality which is needed > and quite easy

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Stephen Reay
> On 24 Oct 2016, at 13:12, Stanislav Malyshev wrote: > > Hi! > >> I didn’t suggest we add anything because why not. Knowing something >> is an object is quite similar to knowing something is an array, and > > That's the point - it's not. Array is just an array, all

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Stanislav Malyshev
Hi! > I didn’t suggest we add anything because why not. Knowing something > is an object is quite similar to knowing something is an array, and That's the point - it's not. Array is just an array, all arrays are the same inside. Objects are all different, SPLFileInfo object has nothing in common

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Stephen Reay
Hi, I didn’t suggest we add anything because why not. Knowing something is an object is quite similar to knowing something is an array, and we have type hints for those. You don’t know what the array holds exactly, but you know it’s an array and that you can call array methods safely without