[PHP-DEV] HYBRID VM

2017-05-03 Thread Dmitry Stogov
Hi, I propose a new VM instruction dispatch technique, that provides great speed up on small benchmarks (1.5 times on bench.php) Please review https://github.com/php/php-src/pull/2507 Take into account, that HYBRID VM is not enabled by default and VM has to be regenerated by "php

[PHP-DEV] Re: Thread safe interned strings

2017-02-17 Thread Dmitry Stogov
. From: Anatol Belski <anatol@belski.net> Sent: Friday, February 17, 2017 3:17:05 PM To: Dmitry Stogov; 'Nikita Popov'; 'Xinchen Hui'; 'Joe Watkins' Cc: 'PHP internals list' Subject: Thread safe interned strings Hi, I was working on a patch to support interned s

Re: [PHP-DEV] [RFC][VOTE] - list() reference assignment

2017-02-07 Thread Dmitry Stogov
Hi Dave, I don't see a big value in this new addition, however, I also don't see any harm. I added few minor comments about implementation at https://github.com/php/php-src/pull/2371 Please, review and update implementation accordingly. Thanks. Dmitry.

Re: [PHP-DEV] Typed properties problems

2017-01-17 Thread Dmitry Stogov
https://github.com/php/php-src/compare/master...bwoebi:typed_ref_properties From: guilhermebla...@gmail.com <guilhermebla...@gmail.com> Sent: Tuesday, January 17, 2017 6:02:09 PM To: Dmitry Stogov Cc: Bob Weinand; Joe Watkins; PHP internals list Subject: Re

[PHP-DEV] Typed properties problems

2017-01-17 Thread Dmitry Stogov
Hi Bob, I've found a number of problems: $ sapi/cli/php -r 'class Foo {public bool $b = false;} $x = new Foo; $x->b->ops += 5; echo gettype($x->b),"\n";' object $ sapi/cli/php -r 'class Foo {public bool $b = false;} $x = new Foo; $x->b->ops++; echo gettype($x->b),"\n";' object $

[PHP-DEV] Re: [PHP-CVS] com php-src: Introduced "zend_type" - an abstraction for type-hinting representation.: Zend/zend_API.c Zend/zend_API.h Zend/zend_builtin_functions.c Zend/zend_compile.c Zend/ze

2017-01-13 Thread Dmitry Stogov
Sorry, for breaking. I'll try fix this at evening (sorry, I don't have time right now). From: Sebastian Bergmann <sebast...@php.net> Sent: Friday, January 13, 2017 12:37:37 PM To: internals@lists.php.net Cc: Dmitry Stogov Subject: Re: [PHP-CVS] com p

Re: [PHP-DEV] Change in type-hint representation

2017-01-12 Thread Dmitry Stogov
Dmitry Stogov Cc: Derick Rethans; PHP internals list; Joe Watkins; Zeev Suraski; Anatol Belski (a...@php.net); Nikita Popov; Xinchen Hui Subject: Re: [PHP-DEV] Change in type-hint representation > Am 11.01.2017 um 17:37 schrieb Dmitry Stogov <dmi...@zend.com>: > > The patch

Re: [PHP-DEV] Re: Change in type-hint representation

2017-01-12 Thread Dmitry Stogov
* into zend_string*. Thanks. Dmitry. From: Andrea Faulds <a...@ajf.me> Sent: Thursday, January 12, 2017 1:39:56 AM To: internals@lists.php.net Subject: [PHP-DEV] Re: Change in type-hint representation Hey Dmitry, Dmitry Stogov wrote: > I propose to

[PHP-DEV] Re: Change in type-hint representation

2017-01-12 Thread Dmitry Stogov
On Jan 11, 2017 11:46 PM, Nikita Popov <nikita@gmail.com> wrote: On Wed, Jan 11, 2017 at 1:07 PM, Dmitry Stogov <dmi...@zend.com<mailto:dmi...@zend.com>> wrote: Hi, I propose to introduce a unified type representation (zend_type). Now it's going to be used for t

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Dmitry Stogov
m/dstogov/1b25079856afccf0d69f77d499cb0ab1> https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1 Thanks. Dmitry. From: Derick Rethans <der...@php.net> Sent: Wednesday, January 11, 2017 6:43:50 PM To: Dmitry Stogov Cc: PHP internals list; Bob Weinand; Joe Wat

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Dmitry Stogov
On Jan 11, 2017 4:51 PM, Michał Brzuchalski <mic...@brzuchalski.com> wrote: 2017-01-11 14:35 GMT+01:00 Nikita Nefedov <inefe...@gmail.com<mailto:inefe...@gmail.com>>: On Wed, 11 Jan 2017 15:07:39 +0300, Dmitry Stogov <dmi...@zend.com<mailto:dmi...@zend.com&g

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Dmitry Stogov
On Jan 11, 2017 4:36 PM, Nikita Nefedov <inefe...@gmail.com> wrote: On Wed, 11 Jan 2017 15:07:39 +0300, Dmitry Stogov <dmi...@zend.com> wrote: > Hi, > > > I propose to introduce a unified type representation (zend_type). > > Now it's going to be used for typing

[PHP-DEV] Change in type-hint representation

2017-01-11 Thread Dmitry Stogov
Hi, I propose to introduce a unified type representation (zend_type). Now it's going to be used for typing of arguments and return values. Later we should use it for properties and other things. https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1 The main changes are in

Re: [PHP-DEV] Fw: unpack()

2016-12-19 Thread Dmitry Stogov
Fixed. Thanks for catching and sorry for delay. Dmitry. From: Leigh <lei...@gmail.com> Sent: Tuesday, December 13, 2016 6:36:00 PM To: Dmitry Stogov Cc: Nikita Popov; internals@lists.php.net; Hynek Bartoš Subject: Re: [PHP-DEV] Fw: unpack() On 29 Februar

[PHP-DEV] Change in Exception re-throwing

2016-12-07 Thread Dmitry Stogov
Hi, Please take a look into the patch. https://gist.github.com/dstogov/35a480a705b4a96d3d150e4d92dfd1a5 It substitutes calls to zend_throw_exception_internal(NULL) by zend_rethrow_exeption(). This simplifies code and dosn't change any behavior for PHP itself, however this may affect some

[PHP-DEV] Re: Fixing return value memory leaks upon exceptions in opcode operand freeing

2016-12-02 Thread Dmitry Stogov
On Dec 1, 2016 12:46 PM, Dmitry Stogov <dmi...@zend.com> wrote: > > On Dec 1, 2016 12:21 PM, Bob Weinand <bobw...@hotmail.com> wrote: > > > > > >> Am 01.12.2016 um 08:15 schrieb Dmitry Stogov <dmi...@zend.com>: > >> > >> Hi, > >

[PHP-DEV] Re: [PATCH] opcache bug #69090, prepend user identifier to keys

2016-11-16 Thread Dmitry Stogov
I think, it's better to disable bits permutation for both 32 and 64 bit systems. And also disable opcache for request if root inode exceeds 2^32 on 32-bit systems + emit warning. This should be a robust solution. Right? Thanks. Dmitry On Nov 17, 2016 12:09 AM, Dmitry Stogov <dmi...@zend.

[PHP-DEV] Re: [PATCH] opcache bug #69090, prepend user identifier to keys

2016-11-16 Thread Dmitry Stogov
https://www.quora.com/What-is-the-maximum-number-of-inodes-in-Linux-filesystems-I-found-suggestion-that-for-Ext4-it-is-4-billion-files-32-bit-number-Is-it-true-for-XFS-and-or-BtrFS From: Dmitry Stogov Sent: Wednesday, November 16, 2016 11:56:45 PM To: Nikita Popov

[PHP-DEV] Re: [PATCH] opcache bug #69090, prepend user identifier to keys

2016-11-16 Thread Dmitry Stogov
On Nov 16, 2016 8:03 PM, Nikita Popov <nikita@gmail.com> wrote: > > On Tue, Nov 15, 2016 at 6:32 PM, Dmitry Stogov <dmi...@zend.com> wrote: >> >> On Nov 15, 2016 18:50, Nikita Popov <nikita@gmail.com> wrote: >> > >> > On Tue, Nov 15,

Re: [PHP-DEV] Re: [PATCH] opcache bug #69090, prepend user identifier to keys

2016-11-16 Thread Dmitry Stogov
I've just committed the fix into PHP-5.6 and above. Unfortunately, I can't create phpt tests, because they would require root. Thanks. Dmitry. From: Anatol Belski <anatol@belski.net> Sent: Wednesday, November 16, 2016 12:57:16 PM To: Dmitry Stogo

[PHP-DEV] Re: [PATCH] opcache bug #69090, prepend user identifier to keys

2016-11-15 Thread Dmitry Stogov
On Nov 15, 2016 18:50, Nikita Popov <nikita@gmail.com> wrote: > > On Tue, Nov 15, 2016 at 4:19 PM, Dmitry Stogov <dmi...@zend.com> wrote: >> >> New patch, attached to bug report, should fix both problems. >> >> I'm going to commit it tomorrow,

[PHP-DEV] Re: [PATCH] opcache bug #69090, prepend user identifier to keys

2016-11-15 Thread Dmitry Stogov
New patch, attached to bug report, should fix both problems. I'm going to commit it tomorrow, if no objections. Thanks. Dmitry. From: Dmitry Stogov <dmi...@zend.com> Sent: Tuesday, November 15, 2016 2:41:47 PM To: php-...@coydogsoftware.net C

[PHP-DEV] Re: [PATCH] opcache bug #69090, prepend user identifier to keys

2016-11-15 Thread Dmitry Stogov
. From: php-...@coydogsoftware.net <php-...@coydogsoftware.net> Sent: Friday, November 11, 2016 4:03:29 PM To: Dmitry Stogov Cc: ras...@lerdorf.com; internals@lists.php.net; Anatol Belski (a...@php.net); Zeev Suraski Subject: Re: [PATCH] opcache bug #69090, p

[PHP-DEV] Re: [PATCH] opcache bug #69090, prepend user identifier to keys

2016-11-10 Thread Dmitry Stogov
t; > > On Thu, Nov 10, 2016 at 08:51:58AM +, Dmitry Stogov wrote: > > > > > > The patch introduces syscall in the hot function (this may be > > > optimized). > > > > Agreed. That isn't ideal. But the geteuid() call shouldn't be done > > during opc

[PHP-DEV] Re: [PATCH] opcache bug #69090, prepend user identifier to keys

2016-11-10 Thread Dmitry Stogov
Hi, On Nov 10, 2016 5:10 PM, php-...@coydogsoftware.net wrote: > > Hello, > > Thank you for the response. Replies inline: > > On Thu, Nov 10, 2016 at 08:51:58AM +0000, Dmitry Stogov wrote: > > > > I see the problem(s) and I took a look into the patch. &g

[PHP-DEV] Re: [PATCH] opcache bug #69090, prepend user identifier to keys

2016-11-10 Thread Dmitry Stogov
ion and may change my mind. I'll also try to find a better solution. Any suggestions are welcome. Thanks. Dmitry. From: php-...@coydogsoftware.net <php-...@coydogsoftware.net> Sent: Friday, November 4, 2016 2:00:03 PM To: internals@lists.php.net Cc: Dmit

Re: [PHP-DEV] Re: PHP 5.6 static access valgrind issue

2016-11-10 Thread Dmitry Stogov
On Nov 9, 2016 20:45, Derick Rethans wrote: > > On Wed, 9 Nov 2016, Nikita Popov wrote: > > > On Wed, Nov 9, 2016 at 4:09 PM, Derick Rethans wrote: > > > > > On Wed, 9 Nov 2016, Christoph M. Becker wrote: > > > > > > > On 09.11.2016 at 15:21, Derick Rethans wrote:

Re: [PHP-DEV] JIT for PHP project

2016-10-26 Thread Dmitry Stogov
ork on Windows anyway). zend_jit_x86.dasc will have to be adopted to support Windows calling convention, of course. Thanks. Dmitry. From: Anatol Belski <anatol@belski.net> Sent: Wednesday, October 26, 2016 1:49:49 PM To: Dmitry Stogov; 'PHP internals

Re: [PHP-DEV] Exploit fully packed array/hash property

2016-10-19 Thread Dmitry Stogov
:01 PM To: Dmitry Stogov; Xinchen Hui; Nikita Popov; Joe Watkins; Bob Weinand; Andrea Faulds Cc: PHP Internals Subject: Re: [PHP-DEV] Exploit fully packed array/hash property Hi Dmitry, On second thought, I might have dismissed your HASH_FLAG_*_KEYS idea prematurely. Of course we will have to set

Re: [PHP-DEV] Exploit fully packed array/hash property

2016-10-19 Thread Dmitry Stogov
. From: Benjamin Coutu <ben.co...@zeyos.com> Sent: Wednesday, October 19, 2016 6:51:00 PM To: Dmitry Stogov; Xinchen Hui; Nikita Popov; Joe Watkins; Bob Weinand; Andrea Faulds Cc: PHP Internals Subject: Re: [PHP-DEV] Exploit fully packed array/hash property I would suggest we stickt

Re: [PHP-DEV] Exploit fully packed array/hash property

2016-10-19 Thread Dmitry Stogov
yos.com> Sent: Wednesday, October 19, 2016 5:31:01 PM To: Dmitry Stogov; Xinchen Hui; Nikita Popov; Joe Watkins Cc: PHP Internals Subject: Re: [PHP-DEV] Exploit fully packed array/hash property Hi Dmitry, there is a typo in line 78 of your patch (https://gist.github.com/dstogov/429fcc2ba051fdcf774a3

Re: [PHP-DEV] Exploit fully packed array/hash property

2016-10-19 Thread Dmitry Stogov
y/hash property Hi Dmitry, Dmitry Stogov wrote: > The main API/BC changes implementation: > https://gist.github.com/dstogov/429fcc2ba051fdcf774a310c5d6db00d > > All tests passed. Performance is not affected (+1 CPU instruction on each > *new* element insertion) > > If it's OK an

Re: [PHP-DEV] Exploit fully packed array/hash property

2016-10-19 Thread Dmitry Stogov
Thanks Joe. I'll add few optimization and make additional testing, then commit in two peaces. From: Joe Watkins <pthre...@pthreads.org> Sent: Wednesday, October 19, 2016 4:35:36 PM To: Dmitry Stogov Cc: Benjamin Coutu; Xinchen Hui; Nikita Popov; PHP Int

Re: [PHP-DEV] Exploit fully packed array/hash property

2016-10-19 Thread Dmitry Stogov
for optimization. All of them are going to be self-containing changes to particular functions implementation. Thanks. Dmitry. From: Dmitry Stogov <dmi...@zend.com> Sent: Wednesday, October 19, 2016 2:20:12 PM To: Benjamin Coutu; Xinchen Hui; Nikita Popo

Re: [PHP-DEV] Exploit fully packed array/hash property

2016-10-19 Thread Dmitry Stogov
en Hui; Dmitry Stogov; Nikita Popov Cc: PHP Internals Subject: [PHP-DEV] Exploit fully packed array/hash property Hello everyone, I've identified a few more array/hash use cases where it might make sense to introduce special short circuit logic for packed arrays. Specifically, there is an addi

Re: [PHP-DEV] Directly embed small strings in zvals

2016-09-13 Thread Dmitry Stogov
Hi, I was skeptical about this idea, but the PoC looks interesting and quite simple. This might be too big change for 7.*, if we won't completely hide implementation details for extensions using existing macros... I'm not sure if this will lead to performance improvement. On one hand, we

Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess

2016-09-02 Thread Dmitry Stogov
. From: David Walker <d...@mudsite.com> Sent: Thursday, September 1, 2016 7:40:15 PM To: Dmitry Stogov; Christoph M. Becker; Marco Pivetta Cc: PHP Internals List; Nikita Popov Subject: Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess On Thu, Sep 1, 2016 at 1:03 AM

[PHP-DEV] JIT for PHP project

2016-09-01 Thread Dmitry Stogov
Hi @internals, I'm glad to say that we have started a new JIT for PHP project and hope to deliver some useful results for the next PHP version (probably 8.0). We are very early in the process and for now there isn't any real performance improvement yet. So far we spent just 2 weeks mainly

Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess

2016-09-01 Thread Dmitry Stogov
; Sent: Thursday, September 1, 2016 3:05:44 AM To: Christoph M. Becker; Dmitry Stogov; Marco Pivetta Cc: PHP Internals List; Nikita Popov Subject: Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess On Wed, Aug 31, 2016 at 7:49 AM David Walker <d...@mudsite.com

Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess

2016-08-31 Thread Dmitry Stogov
no. if you would try the proposed PR with this code, you would see: Fatal error: Uncaught Error: Unsupported operand types From: Marco Pivetta <ocram...@gmail.com> Sent: Wednesday, August 31, 2016 10:10:23 AM To: Dmitry Stogov Cc: Christoph M. Becke

Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess

2016-08-31 Thread Dmitry Stogov
mplemented, and I vote against it. Thanks. Dmitry. From: Niklas Keller <m...@kelunik.com> Sent: Wednesday, August 31, 2016 10:58:16 AM To: Dmitry Stogov; Christoph M. Becker; David Walker; PHP internals Cc: Nikita Popov Subject: Re: [PHP-DEV] Re: [RFC]

Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess

2016-08-31 Thread Dmitry Stogov
I vote NO, because the implementation introduces more problems than intents to fix. For example the following code starts to throw exception: BTW, I'm not against the feature, I'm against the implementation. It's just can't be committed in current state. Thanks. Dmitry.

[PHP-DEV] Re: Change to Too Few Args Exception RFC

2016-08-06 Thread Dmitry Stogov
I don't see a big problem accepting this. The change is really minor, and makes sense. Dmitry. On Aug 6, 2016 5:26 AM, Davey Shafik wrote: Hey all, I know this is a little late in the process, but it's something I've noticed while prepping some content around 7.1. This RFC:

Re: [PHP-DEV] [RFC] [Vote] Asynchronous Signal Handling

2016-06-28 Thread Dmitry Stogov
une 28, 2016 19:41 To: Dmitry Stogov Cc: PHP internals Subject: Re: [PHP-DEV] [RFC] [Vote] Asynchronous Signal Handling On Tue, Jun 28, 2016 at 6:16 PM, Dmitry Stogov <dmi...@zend.com<mailto:dmi...@zend.com>> wrote: Hi internals, The RFC has been moved into voting stage: https:

[PHP-DEV] [RFC] [Vote] Asynchronous Signal Handling

2016-06-28 Thread Dmitry Stogov
Hi internals, The RFC has been moved into voting stage: https://wiki.php.net/rfc/async_signals Thanks. Dmitry.

Re: [PHP-DEV] [RFC] Asynchronous Signal Handling (withiut TICKs and any additional overhead).

2016-06-28 Thread Dmitry Stogov
Everything fine now. From: Pierre Joye <pierre@gmail.com> Sent: Tuesday, June 28, 2016 5:39:08 AM To: Dmitry Stogov Cc: PHP internals Subject: Re: [PHP-DEV] [RFC] Asynchronous Signal Handling (withiut TICKs and any additional overhead). hi, On Fri,

Re: [PHP-DEV] [RFC] Asynchronous Signal Handling (withiut TICKs and any additional overhead).

2016-06-27 Thread Dmitry Stogov
On 06/27/2016 02:05 PM, Pierre Joye wrote: On Mon, Jun 27, 2016 at 5:08 PM, Joe Watkins wrote: Morning, How is the impact wider than ext/pcntl ? The implementation is only in pctnl. The feature is used indirectly by the engine and makes it a core feature. Quote

Re: [PHP-DEV] [RFC] Asynchronous Signal Handling (withiut TICKs and any additional overhead).

2016-06-27 Thread Dmitry Stogov
um 12:20 schrieb Dmitry Stogov: > Please review the RFC https://wiki.php.net/rfc/async_signals Would this alleviate the fact that ticks are broken in PHP 7? See https://github.com/sebastianbergmann/phpunit/issues/2205 for what I use ticks for in PHPUnit. -- PHP Internals - PHP Runtime De

Re: [PHP-DEV] [RFC] Asynchronous Signal Handling (withiut TICKs and any additional overhead).

2016-06-24 Thread Dmitry Stogov
The INI setting can be changed at run-time through ini_set(). I'll update the RFC. From: Mike Willbanks <pen...@gmail.com> Sent: Friday, June 24, 2016 6:50:59 PM To: Dmitry Stogov Cc: PHP internals Subject: Re: [PHP-DEV] [RFC] Asynchronous Signal Ha

[PHP-DEV] [RFC] Asynchronous Signal Handling (withiut TICKs and any additional overhead).

2016-06-24 Thread Dmitry Stogov
Hi internals, Please review the RFC https://wiki.php.net/rfc/async_signals Thanks. Dmitry.

Re: [PHP-DEV] [RFC] Additional context in pcntl_signal handler (was Re: [PHP-DEV] pcntl_signal & sa_siginfo)

2016-06-23 Thread Dmitry Stogov
BTW: I'm not sure what pcntl_sigaction() could return as the "oldact" argument..., so may be the original proposal is good enough. ____ From: Dmitry Stogov <dmi...@zend.com> Sent: Thursday, June 23, 2016 9:02:55 PM To: PHP internals; bis...@php.net;

Re: [PHP-DEV] [Bug #68319] unserialize() with modified class definition.

2016-06-23 Thread Dmitry Stogov
Looking into the number of unserialize() related "security" issues, I think we should fix all of them once and forever, introducing a validation pass. In case something in provided data is wrong (e.g. duplicated properties or array keys, unexpected types, invalid references, invalid property

Re: [PHP-DEV] [RFC] Additional context in pcntl_signal handler (was Re: [PHP-DEV] pcntl_signal & sa_siginfo)

2016-06-23 Thread Dmitry Stogov
Hi, To keep maximum compatibility and eliminate unnecessary additional overhead, I would keep pcntl_signal() unchanged, but add pcntl_sigaction() with the ability to specify the need for the second argument (In the same way as POSIX does). Joe, Davey, when we stop targeting new RFCs for 7.1?

[PHP-DEV] ext/pcntl asynchronous sugnal handling

2016-06-23 Thread Dmitry Stogov
Hi, Currently OS signals may be handled through ext/pcntl: - synchronously, calling pcntl_signal_dispatch() manually - asynchronously, if PHP scripts compiled with declare(ticks=N); The simple patch uses the recently added into Zend Engine ability and allows asynchronous signal handling

[PHP-DEV] Re: Fixing backtraces with custom get_class_name() handler

2016-06-22 Thread Dmitry Stogov
get_class() returned some decorated name. anyway, fixing backtrace is already good. Thanks. Dmitry. From: Nikita Popov <nikita@gmail.com> Sent: Wednesday, June 22, 2016 4:30:26 PM To: Dmitry Stogov Cc: Nikita Popov; Oz Gilat; PHP internals Subje

[PHP-DEV] Fixing backtraces with custom get_class_name() handler

2016-06-22 Thread Dmitry Stogov
Hi Nikita, When we developed php 7.0, we replaced most calls to get_class_name() by simple obj->ce->name reading. However, this functionality was used by some 3-rd part extensions (e.g. Zend JavaBridge and may be pecl/perl). These extensions create proxy classes and control remote objects

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-20 Thread Dmitry Stogov
__ From: Pierre Joye <pierre@gmail.com> Sent: Friday, June 17, 2016 9:31:33 AM To: Dmitry Stogov Cc: PHP internals; Stas Malyshev Subject: Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition On Jun 17, 2016 1:10 PM, "Dmitry Stogov" <dmi...@zend.com&

[PHP-DEV] Enable Zend Signals by Default

2016-06-20 Thread Dmitry Stogov
Hi, I'm going to enable Zend-Signals subsystem by default. With "Zend signals" enabled, we would have safe termination signal handling in opcache, that would prevent staying SHM in inconsistent state, in cost of few additional checks on each opcache SHM update (performance impact is

Re: [PHP-DEV] [RFC] Iterable

2016-06-20 Thread Dmitry Stogov
6 7:35:50 PM To: Dan Ackroyd Cc: internals@lists.php.net; Dmitry Stogov Subject: Re: [PHP-DEV] [RFC] Iterable > On Jun 18, 2016, at 6:11 PM, Dan Ackroyd <dan...@basereality.com> wrote: > > Hi Aaron, > >> does anyone have any further feedback on this proposal? > >

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-17 Thread Dmitry Stogov
Got it :( Then this may be a serious BC break, and it's better to depricate it in 7.1 and throw exception only in 8. Thanks. Dmitry. On Thu, Jun 16, 2016 at 8:14 PM +0300, "Stanislav Malyshev" > wrote: Hi! > Please review:

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-16 Thread Dmitry Stogov
ications, wrapping constant definitions, that may be redefined, with try/catch. Thanks. Dmitry. ____ From: Dmitry Stogov Sent: Friday, June 10, 2016 11:06:55 PM To: PHP internals Subject: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition Hi internals,

Re: [PHP-DEV] [RFC] [Accepted] Replace "Missing argument" warning with "Too few arguments" exception

2016-06-16 Thread Dmitry Stogov
was in shorten discussion period. I think the RMs should step in here. Yeah, I suppose, RMs may have a right to take a decision and revert this. Thanks. Dmitry. Thanks, Pierre On Jun 16, 2016 1:12 PM, "Dmitry Stogov" <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: Hi in

[PHP-DEV] [RFC] [Accepted] Replace "Missing argument" warning with "Too few arguments" exception

2016-06-16 Thread Dmitry Stogov
Hi internals, The RFC https://wiki.php.net/rfc/too_few_args was accepted by 39 against 11, and the corresponding patch was merged into master. Thanks. Dmitry.

[PHP-DEV] [RFC] [Accepted] Fix inconsistent behavior of $this variable

2016-06-16 Thread Dmitry Stogov
Hi internals, The RFC https://wiki.php.net/rfc/this_var was accepted by 43 against 0, and the corresponding patch was merged into master. Thanks. Dmitry.

Re: [PHP-DEV] Deprecations PHP 7.1

2016-06-15 Thread Dmitry Stogov
Nikita, As I remember , you also liked to deprecate $errcontext argument of error handlers. http://php.net/manual/en/function.set-error-handler.php Thanks. Dmitry. From: Fleshgrinder Sent: Wednesday, June 15, 2016 10:58:30 PM To:

Re: [PHP-DEV] Is the "No BC Breaks in Minor Releases" policy enforceable?

2016-06-14 Thread Dmitry Stogov
On 06/14/2016 07:17 PM, Fleshgrinder wrote: On 6/14/2016 12:43 PM, Dmitry Stogov wrote: Hi, Just take into account, that 7.0 was released more than after 10 years of php-5 life, and of course we don't have any plans or goal for 8.0 yet. Waiting another 10 years for fixing inconsistencies

Re: [PHP-DEV] Is the "No BC Breaks in Minor Releases" policy enforceable?

2016-06-14 Thread Dmitry Stogov
Hi, The "obvious optimization" mentioned in the RFC, assumes just removing a line of code. https://github.com/zendtech/php-src/blob/zend-jit/ext/opcache/Optimizer/zend_inference.c#L2900 This may prevent run-time checks for IS_UNDEF on each read of the corresponding argument variables.

Re: [PHP-DEV] Is the "No BC Breaks in Minor Releases" policy enforceable?

2016-06-14 Thread Dmitry Stogov
Hi, Just take into account, that 7.0 was released more than after 10 years of php-5 life, and of course we don't have any plans or goal for 8.0 yet. Waiting another 10 years for fixing inconsistencies, that we "missed" in 7.0, would limit our progress on bytecode and VM optimizations targeted

Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-10 Thread Dmitry Stogov
In general, you are right, but this is possible only if application ignores Error exceptions... From: morrison.l...@gmail.com <morrison.l...@gmail.com> on behalf of Levi Morrison <le...@php.net> Sent: Friday, June 10, 2016 11:50:26 PM To: Dmitry St

[PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition

2016-06-10 Thread Dmitry Stogov
Hi internals, Please review: https://wiki.php.net/rfc/constant_redefinition Thanks. Dmitry.

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

2016-06-10 Thread Dmitry Stogov
On 06/10/2016 05:31 PM, Bob Weinand wrote: Am 10.06.2016 um 16:24 schrieb Levi Morrison <le...@php.net>: On Fri, Jun 10, 2016 at 6:37 AM, Dmitry Stogov <dmi...@zend.com> wrote: Hi, I hardly worked on implementation of this patch for a week, but I still don't like it.

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

2016-06-10 Thread Dmitry Stogov
On 06/10/2016 05:24 PM, Levi Morrison wrote: On Fri, Jun 10, 2016 at 6:37 AM, Dmitry Stogov <dmi...@zend.com><mailto:dmi...@zend.com> wrote: Hi, I hardly worked on implementation of this patch for a week, but I still don't like it. It makes 15% slowdown on each pro

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

2016-06-10 Thread Dmitry Stogov
On 06/10/2016 05:24 PM, Levi Morrison wrote: On Fri, Jun 10, 2016 at 6:37 AM, Dmitry Stogov <dmi...@zend.com> wrote: Hi, I hardly worked on implementation of this patch for a week, but I still don't like it. It makes 15% slowdown on each property update in existing PHP code (w

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

2016-06-10 Thread Dmitry Stogov
Hi, I hardly worked on implementation of this patch for a week, but I still don't like it. It makes 15% slowdown on each property update in existing PHP code (without types), and I don't see a way to improve this. Update of typed properties is going to be even more expensive. Benchmark

[PHP-DEV] [RFC] [VOTE] Replace "Missing argument" warning with "Too few arguments" exception

2016-06-06 Thread Dmitry Stogov
Hi, This mini RFC has been moved to "Voting" state. Voting began on Jun 6 and will close on June 16. You can find the full RFC at: https://wiki.php.net/rfc/too_few_args I encourage everyone to read the RFC and cast your vote towards whichever option you feel is the best for the language and

[PHP-DEV] [RFC] [VOTE] Fix inconsistent behavior of $this variable

2016-06-06 Thread Dmitry Stogov
Hi, It has been two weeks since discussion started on the RFC to fix inconsistent behavior of $this variable. This RFC has therefore been moved to "Voting" state. Voting began on Jun 6 and will close on June 16. You can find the full RFC at:

Re: [PHP-DEV] [RFC] Replace "Missing argument" warning with "Too few arguments" exception

2016-06-02 Thread Dmitry Stogov
On 06/02/2016 03:01 PM, Bob Weinand wrote: Am 01.06.2016 um 12:55 schrieb Dmitry Stogov <dmi...@zend.com>: hi, Please take a look into the proposal. https://wiki.php.net/rfc/too_few_args The RFC is extremely simple (both proposal and implementation) and almost completely des

Re: [PHP-DEV] [RFC] Replace "Missing argument" warning with "Too few arguments" exception

2016-06-02 Thread Dmitry Stogov
On 06/02/2016 02:42 PM, Benjamin Eberlei wrote: On Wed, Jun 1, 2016 at 12:55 PM, Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: hi, Please take a look into the proposal. https://wiki.php.net/rfc/too_few_args The RFC is extremely simple (b

Re: [PHP-DEV] [RFC] Replace "Missing argument" warning with "Too few arguments" exception

2016-06-01 Thread Dmitry Stogov
lt;pthre...@pthreads.org> Sent: Wednesday, June 1, 2016 8:42:49 PM To: Dmitry Stogov Cc: PHP internals; Nikita Popov Subject: Re: [PHP-DEV] [RFC] Replace "Missing argument" warning with "Too few arguments" exception Evening, Could you expand on the "obvious optimization o

Re: [PHP-DEV] [RFC] Replace "Missing argument" warning with "Too few arguments" exception

2016-06-01 Thread Dmitry Stogov
func_get_args() useful, when we pass more actual parameters than expected. This case is unaffected. Thanks. Dmitry. From: Florian Anderiasch <m...@anderiasch.de> Sent: Wednesday, June 1, 2016 2:08:09 PM To: Dmitry Stogov; PHP internals Cc: Nikita

[PHP-DEV] [RFC] Replace "Missing argument" warning with "Too few arguments" exception

2016-06-01 Thread Dmitry Stogov
hi, Please take a look into the proposal. https://wiki.php.net/rfc/too_few_args The RFC is extremely simple (both proposal and implementation) and almost completely described by the email subject. I think, this mini-RFC doesn't need 2-weeks discussion period, so I'm going to start the

Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable

2016-05-31 Thread Dmitry Stogov
changing "$this" into "this" is not an option. This would break 90% of PHP code :) From: Marc Bennewitz Sent: Tuesday, May 24, 2016 10:21:02 PM To: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this

Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable

2016-05-31 Thread Dmitry Stogov
Hi Richard, $this is still confirm to variable syntax. It's just a special variable. I think, we should keep lexical rules unchanged. Thanks. Dmitry. From: Fleshgrinder <p...@fleshgrinder.com> Sent: Tuesday, May 31, 2016 7:19:57 PM To: Dmitry

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

2016-05-25 Thread Dmitry Stogov
ins <pthre...@pthreads.org> Sent: Wednesday, May 25, 2016 4:22:02 PM To: Nikita Popov Cc: Dmitry Stogov; PHP internals; Phil Sturgeon; Bob Weinand Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties Morning Nikita, That's pretty persuasive ... Dmitry, what are your thoughts on those poin

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

2016-05-25 Thread Dmitry Stogov
Wed, May 25, 2016 at 8:06 AM, Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: On 05/25/2016 09:06 AM, Joe Watkins wrote: Morning Dmitry, There's no section for nullables, but there is mention of them, specifically in relation to your query:

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

2016-05-25 Thread Dmitry Stogov
ms like I'm missing information, I don't know what you and Bob found out yet ... I super appreciate you guys working on it, obviously. Thanks for that :) Cheers Joe On Tue, May 24, 2016 at 8:04 PM, Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: Hi Joe,

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

2016-05-24 Thread Dmitry Stogov
Hi Joe, I've add implementation for nullable typed properties (as they fit into the patch design), but RFC missed any description of nullable properties. See tests Zend/tests/type_declarations/typed_properties_047.phpt, Zend/tests/type_declarations/typed_properties_048.phpt,

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

2016-05-24 Thread Dmitry Stogov
he patch (this would simplify the review). I'll need to take a deeper look once again, after the opcache compatibility fix. Thanks. Dmitry. From: Joe Watkins <pthre...@pthreads.org> Sent: Monday, May 23, 2016 1:16:22 PM To: Julien Pauli Cc: Stanislav Malyshev; D

Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable

2016-05-24 Thread Dmitry Stogov
On 05/24/2016 11:04 AM, Stanislav Malyshev wrote: Hi! Keeping inconsistent behavior isn't good as well. It's not good, but it's not also very bad. Nobody really does that, so whatever happens in these cases is mostly irrelevant. For me it's easier to check and fix all inconsistencies at

[PHP-DEV] Re: "finally" handling refactoring (Bug #72213)

2016-05-24 Thread Dmitry Stogov
. From: Nikita Popov <nikita@gmail.com> Sent: Tuesday, May 24, 2016 1:12:31 AM To: Dmitry Stogov Cc: Xinchen Hui; internals Subject: Re: "finally" handling refactoring (Bug #72213) On Mon, May 23, 2016 at 11:36 PM, Dmitry Stogov <dmi...@zend.com<mailto:d

Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable

2016-05-24 Thread Dmitry Stogov
On 05/24/2016 09:54 AM, Stanislav Malyshev wrote: Hi! Please review the RFC. It proposes to fix all known inconsistencies related to handling of special $this variable. https://wiki.php.net/rfc/this_var What is the reason behind all these changes? Does it serve some bigger purpose? I

Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable

2016-05-24 Thread Dmitry Stogov
-assigned. Thank. Dmitry. On Tue, May 24, 2016 at 6:24 AM, Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: Hi internals, Please review the RFC. It proposes to fix all known inconsistencies related to handling of special $this variable.

Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable

2016-05-24 Thread Dmitry Stogov
On 05/24/2016 05:29 AM, Xinchen Hui wrote: Hey: On Tue, May 24, 2016 at 4:24 AM, Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: Hi internals, Please review the RFC. It proposes to fix all known inconsistencies related to handling

[PHP-DEV] Re: "finally" handling refactoring (Bug #72213)

2016-05-23 Thread Dmitry Stogov
Hi, On 05/23/2016 07:24 PM, Nikita Popov wrote: On Mon, May 23, 2016 at 1:25 PM, Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: Thanks for review. Both problems should be fixed now https://gist.github.com/dstogov/0a809891c6a3ac3fac4bd0d9711dd330

Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable

2016-05-23 Thread Dmitry Stogov
good point. I'll update RFC and patch to support extract() and get_defined_vars(). From: Nikita Popov <nikita@gmail.com> Sent: Monday, May 23, 2016 11:46:35 PM To: Dmitry Stogov Cc: internals; Nikita Popov; Bob Weinand; Xinchen Hui Subject: Re: [PHP-DEV

[PHP-DEV] [RFC] Fix inconsistent behavior of $this variable

2016-05-23 Thread Dmitry Stogov
Hi internals, Please review the RFC. It proposes to fix all known inconsistencies related to handling of special $this variable. https://wiki.php.net/rfc/this_var Thanks. Dmitry.

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

2016-05-23 Thread Dmitry Stogov
Yeah "float". It works :) From: Niklas Keller <m...@kelunik.com> Sent: Monday, May 23, 2016 4:46:59 PM To: Dmitry Stogov; Joe Watkins; PHP internals; Phil Sturgeon Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties Dmitry Stogov <dmi...@

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

2016-05-23 Thread Dmitry Stogov
Should this work? x = 5; ?> Currently this leads to PHP Fatal error: Uncaught TypeError: Typed property C::$x must be an instance of double, integer used in /home/dmitry/php/php-master/CGI-DEBUG/prop.php:6 From: Joe Watkins

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

2016-05-23 Thread Dmitry Stogov
rom: Joe Watkins <pthre...@pthreads.org> Sent: Monday, May 23, 2016 1:16:22 PM To: Julien Pauli Cc: Stanislav Malyshev; Dmitry Stogov; PHP internals; Phil Sturgeon Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties Morning internals, I have improved the performance of the patch a littl

[PHP-DEV] Re: "finally" handling refactoring (Bug #72213)

2016-05-23 Thread Dmitry Stogov
May 20, 2016 4:54:07 PM To: Dmitry Stogov Cc: Xinchen Hui; internals Subject: Re: "finally" handling refactoring (Bug #72213) On Fri, May 20, 2016 at 2:07 PM, Dmitry Stogov <dmi...@zend.com<mailto:dmi...@zend.com>> wrote: hi, Please review the path htt

<    1   2   3   4   5   6   7   8   9   10   >