Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Björn Larsson
Den 2016-03-30 kl. 05:16, skrev Joe Watkins: Morning Dmitry, 1) static typed properties are prohibited. why? Feels like that's a separate feature, static properties are as good as makes no difference, global variables. Instance properties, the engine has good control over their manipulation,

Re: [PHP-DEV] Re: [RFC Proposal] Null Coalesce Equal Operator

2016-03-30 Thread Björn Larsson
Thank you! I just thought it might have been possible to change the text between the tags on the RFC page. Good luck with the voting! Regards //Björn Den 2016-03-30 kl. 22:25, skrev Midori Kocak: Thank you, I removed ‘equal’, you were right. I could not find a way to change url. Also voting i

Re: [PHP-DEV] OpenSSL ECC Support

2016-03-30 Thread Niklas Keller
2016-03-30 21:04 GMT+02:00 Jakub Zelenka : > There is a PR for that https://github.com/php/php-src/pull/1686 that > should land in 7.1 if there are no objections... > > On Wed, Mar 30, 2016 at 6:46 PM, Niklas Keller wrote: > >> Hi, >> >> there's an open feature request with a patch since 2012, it

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Björn Larsson
Den 2016-03-29 kl. 22:38, skrev Phil Sturgeon: On Tue, Mar 29, 2016 at 2:58 PM, Björn Larsson wrote: Den 2016-03-29 kl. 17:32, skrev Phil Sturgeon: I'd like to thank everyone for their feedback on this RFC! It looks like the majority of concerns were solved during the course of this discussio

Re: [PHP-DEV] Re: [RFC Proposal] Null Coalesce Equal Operator

2016-03-30 Thread Midori Kocak
Thank you, I removed ‘equal’, you were right. I could not find a way to change url. Also voting is already started. Midori > On 30 Mar 2016, at 22:22, Björn Larsson wrote: > > Hi, > > Think the word equal should be removed from RFC name so > it becomes "Null Coalescing Assignment Operator" or

Re: [PHP-DEV] Forbid binding methods to incompatible $this

2016-03-30 Thread Dmitry Stogov
On 03/30/2016 10:46 PM, Nikita Popov wrote: On Wed, Mar 30, 2016 at 6:18 PM, Dmitry Stogov > wrote: Great it's not used anymore 😊 I personally agree to remove this. Nikita, can you also investigate the need for double pointer to object in typede

Re: [PHP-DEV] Forbid binding methods to incompatible $this

2016-03-30 Thread Nikita Popov
On Wed, Mar 30, 2016 at 6:18 PM, Dmitry Stogov wrote: > Great it's not used anymore [image: 😊] > > I personally agree to remove this. > > > Nikita, can you also investigate the need for double pointer to object in > > > typedef union _zend_function *(*zend_object_get_method_t)(zend_object > **obj

Re: [PHP-DEV] OpenSSL ECC Support

2016-03-30 Thread Jakub Zelenka
There is a PR for that https://github.com/php/php-src/pull/1686 that should land in 7.1 if there are no objections... On Wed, Mar 30, 2016 at 6:46 PM, Niklas Keller wrote: > Hi, > > there's an open feature request with a patch since 2012, it's still against > SVN: https://bugs.php.net/bug.php?id

[PHP-DEV] OpenSSL ECC Support

2016-03-30 Thread Niklas Keller
Hi, there's an open feature request with a patch since 2012, it's still against SVN: https://bugs.php.net/bug.php?id=61204 Could somebody go ahead, review and merge that patch? Thanks, Niklas

Re: [PHP-DEV] Forbid binding methods to incompatible $this

2016-03-30 Thread Dmitry Stogov
Great it's not used anymore [😊] I personally agree to remove this. Nikita, can you also investigate the need for double pointer to object in typedef union _zend_function *(*zend_object_get_method_t)(zend_object **object, zend_string *method, const zval *key); As I remember, it's necessary o

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut: ext/mbstring/libmbfl/mbfl/mbfilter.c

2016-03-30 Thread Pierre Joye
On Mar 30, 2016 3:12 PM, "Yasuo Ohgaki" wrote: > > Hi all, > > On Mon, Mar 28, 2016 at 5:22 PM, Stanislav Malyshev wrote: > > Commit:64f42c73efc58e88671ad76b6b6bc8e2b62713e1 > > Author:Stanislav Malyshev Mon, 28 Mar 2016 01:22:37 -0700 > > Parents: 95433e8e339dbb6b5d5541473c166

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Rowan Collins
Fleshgrinder wrote on 19/03/2016 10:48: It is a sad state the implicit public properties use*var* and implicit public methods nothing, this makes the introduction of new visibility modifiers terribly complicated. I see it a bit differently - you could think of "var $foo" as shorthand for "pub

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Rowan Collins
Johannes Schlüter wrote on 30/03/2016 13:18: Maybe we should actually discuss making PHP fully typed and making that consistent instead of adding one piece of typing step by step. This gets an imaginary +1 from me. Function/method parameters and return types make sense as a special case, beca

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Johannes Schlüter
On Wed, 2016-03-30 at 04:16 +0100, Joe Watkins wrote: > > 2) The handling of multiple properties in the same declaration statement > is inconsistent. > > This feels consistent to me .. in other languages where the type is > required, it makes sense to assume the type is implied. > > In a language

Re: [PHP-DEV] Forbid binding methods to incompatible $this

2016-03-30 Thread Alexander Lisachenko
Hello, internals! Go! AOP was used closure rebinding to an incompatible context only for one minor specific feature, called privileged advices, where method was executing in the context of target class. But all main closure binding in the framework core work only with compatible contexts, so every

Re: [PHP-DEV] Forbid binding methods to incompatible $this

2016-03-30 Thread Nikita Popov
On Wed, Mar 30, 2016 at 11:34 AM, Dmitry Stogov wrote: > I agree, this ability is a dirty and annoying hack, but I'm sure, some > people use it. > > Tony, you don't use this in the new runkit replacement? :) > > Thanks. Dmitry. > Is this referring to https://github.com/badoo/soft-mocks? If so, s

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Lester Caine
On 30/03/16 09:31, Dmitry Stogov wrote: >> >> I hope this makes some of these decisions clearer ... > > One more thought about implicit initialization values. (int(0) for int > instead of IS_UNDEF). > I'm not sure if this RFC is going to be accepted yet, but lets think we > will also implement typ

[PHP-DEV] BAD Benchmark Results for PHP Master 2016-03-30

2016-03-30 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-03-30 06:38:56+03:00 commit: 1e82ad8 previous commit:34d8fea revision date: 2016-03-30 01:44:27+01: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] Forbid binding methods to incompatible $this

2016-03-30 Thread Nikita Popov
On Wed, Mar 30, 2016 at 11:29 AM, Chris Riley wrote: > On 29 March 2016 at 23:21, Nikita Popov wrote: > >> Hi internals! >> >> Currently, inside instance methods the following invariant holds: >> >> assert(is_null($this) || is_object($this)) >> >> This is a problem. I'd like to guarantee the

Re: [PHP-DEV] Forbid binding methods to incompatible $this

2016-03-30 Thread Dmitry Stogov
I agree, this ability is a dirty and annoying hack, but I'm sure, some people use it. Tony, you don't use this in the new runkit replacement? :) Thanks. Dmitry. From: Nikita Popov Sent: Wednesday, March 30, 2016 01:21 To: PHP internals Subject: [PHP-DEV

Re: [PHP-DEV] #71915 openssl_random_pseudo_bytes is not "fork-safe"

2016-03-30 Thread Chris Riley
On 29 March 2016 at 19:49, Jakub Zelenka wrote: > I have added some feedback and assigned it to myself ;) > > On Tue, Mar 29, 2016 at 3:05 PM, Tom Worster wrote: > > > mathieuk has requested feedback on a patch to mitigate this problem in > PHP. > > > > https://bugs.php.net/bug.php?id=71915 > >

Re: [PHP-DEV] Forbid binding methods to incompatible $this

2016-03-30 Thread Chris Riley
On 29 March 2016 at 23:21, Nikita Popov wrote: > Hi internals! > > Currently, inside instance methods the following invariant holds: > > assert(is_null($this) || is_object($this)) > > This is a problem. I'd like to guarantee the following invariant instead: > > assert(is_null($this) || $t

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Dmitry Stogov
class A { public int $b, string $c; // <- incompatible with HHVM } We don't have to be compatible with HHVM, but why to go against all the other languages. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Dmitry Stogov
Few more related inconsistencies in current implementation. class A { public int $b; } $a = new A; var_dump($a); // <- prints A::b as NULL foreach ($a as $val) { var_dump($val); // <- prints NULL } All similar inconsistencies would be automatically solved with implicit default value

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Dmitry Stogov
On 03/30/2016 10:50 AM, Joe Watkins wrote: Morning Dmitry, > If we use one rule for arguments, why should we invent others. Properties are going to be nullable only if you explicitly initialise them with NULL. We didn't really invent anything, you are comparing them to parameters, but

[PHP-DEV] Re: [PHP-CVS] com php-src: Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut: ext/mbstring/libmbfl/mbfl/mbfilter.c

2016-03-30 Thread Yasuo Ohgaki
Hi all, On Mon, Mar 28, 2016 at 5:22 PM, Stanislav Malyshev wrote: > Commit:64f42c73efc58e88671ad76b6b6bc8e2b62713e1 > Author:Stanislav Malyshev Mon, 28 Mar 2016 > 01:22:37 -0700 > Parents: 95433e8e339dbb6b5d5541473c1661db6ba2c451 > Branches: PHP-5.5 PHP-5.6 PHP-5.6.20 > > Li

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Joe Watkins
Morning Dmitry, > If we use one rule for arguments, why should we invent others. Properties are going to be nullable only if you explicitly initialise them with NULL. We didn't really invent anything, you are comparing them to parameters, but not return values ... strangely ... Return values