Re: [PHP-DEV] [RFC] JIT

2019-02-04 Thread Dmitry Stogov
On 2/5/19 1:48 AM, Benjamin Eberlei wrote: > > > On Mon, Feb 4, 2019 at 10:29 PM Benjamin Eberlei <mailto:kont...@beberlei.de>> wrote: > > > > On Thu, Jan 31, 2019 at 10:44 AM Dmitry Stogov <mailto:dmi...@zend.com>> wrote: > >

Re: [PHP-DEV] [RFC] JIT

2019-02-04 Thread Dmitry Stogov
On 2/4/19 11:39 PM, Bruce Weirdan wrote: > After figuring out that opcache.jit_buffer_size is specified in bytes > (not in megabytes, as RFC states) Thanks for catching this. Fixed. > I got ~5% speedup running > vimeo/psalm (static analyzer) on its own codebase with default > JIT flags and

Re: [PHP-DEV] [RFC] JIT

2019-02-04 Thread Dmitry Stogov
On 2/4/19 6:22 PM, Nikita Popov wrote: > On Mon, Feb 4, 2019 at 4:11 PM Dmitry Stogov <mailto:dmi...@zend.com>> wrote: > > > > On 2/4/19 5:44 PM, Nikita Popov wrote: > > On Mon, Feb 4, 2019 at 2:26 PM Dmitry Stogov <mailto:dmi...@zend.com&

Re: [PHP-DEV] [RFC] JIT

2019-02-04 Thread Dmitry Stogov
On 2/4/19 5:44 PM, Nikita Popov wrote: > On Mon, Feb 4, 2019 at 2:26 PM Dmitry Stogov <mailto:dmi...@zend.com>> wrote: > > > > On 2/1/19 4:23 PM, Dmitry Stogov wrote: > > > > > > On 2/1/19 3:09 PM, Nikita Popov wrote: >

Re: [PHP-DEV] [RFC] JIT

2019-02-04 Thread Dmitry Stogov
On 2/4/19 1:32 PM, Andrea Faulds wrote: > Dmitry Stogov wrote: >> Hi Internals, >> >> >> I'm glad to finally propose including JIT into PHP. >> >> >> https://wiki.php.net/rfc/jit >> >> >> In the current state it may be incl

Re: [PHP-DEV] [RFC] JIT

2019-02-04 Thread Dmitry Stogov
On 2/1/19 4:23 PM, Dmitry Stogov wrote: > > > On 2/1/19 3:09 PM, Nikita Popov wrote: >> On Thu, Jan 31, 2019 at 10:44 AM Dmitry Stogov > <mailto:dmi...@zend.com>> wrote: >> >> Hi Internals, >> >> >> I'm glad to fi

Re: [PHP-DEV] [RFC] JIT

2019-02-03 Thread Dmitry Stogov
On 2/3/19 9:00 PM, Nikita Popov wrote: > On Sun, Feb 3, 2019 at 5:16 PM Zeev Suraski wrote: > >> >>> On 3 Feb 2019, at 16:43, Jan Ehrhardt wrote: >>> >>> Zeev Suraski in php.internals (Sun, 3 Feb 2019 11:02:56 +): How is that related? >>> >>> It is directly related with

Re: [PHP-DEV] [RFC] JIT

2019-02-03 Thread Dmitry Stogov
On 2/1/19 7:30 PM, Larry Garfield wrote: > On Friday, February 1, 2019 2:41:06 AM CST Dmitry Stogov wrote: >> On 2/1/19 3:29 AM, Larry Garfield wrote: > >>> Question from a non-compiler-engineer: Could we end up in a situation >>> where >>> future

Re: [PHP-DEV] [RFC] JIT

2019-02-01 Thread Dmitry Stogov
On 2/1/19 4:23 PM, Nikita Popov wrote: > On Fri, Feb 1, 2019 at 2:12 PM Dmitry Stogov <mailto:dmi...@zend.com>> wrote: > > > > On 2/1/19 11:55 AM, Joe Watkins wrote: > > Morning Dmitry, and internals, > > > > This is marvell

Re: [PHP-DEV] [RFC] JIT

2019-02-01 Thread Dmitry Stogov
On 2/1/19 3:09 PM, Nikita Popov wrote: > On Thu, Jan 31, 2019 at 10:44 AM Dmitry Stogov <mailto:dmi...@zend.com>> wrote: > > Hi Internals, > > > I'm glad to finally propose including JIT into PHP. > > > https://wiki.php.net/rfc/jit >

Re: [PHP-DEV] [RFC] JIT

2019-02-01 Thread Dmitry Stogov
On 2/1/19 2:12 PM, Pierre Joye wrote: > > > On Thu, Jan 31, 2019, 11:39 PM Dmitry Stogov <mailto:dmi...@zend.com> wrote: > > > > I don't see any problems with including JIT without Windows support. > Windows runs PHP much slower any way. > >

Re: [PHP-DEV] [RFC] JIT

2019-02-01 Thread Dmitry Stogov
dea of merging this into 7.4, for various > reasons that don't need to be repeated. OK. It's not only your opinion. You may vote against, and persuade others. Thanks. Dmitry. > > Bottom line though, I love it, it's brilliant, and look forward to PHP 8. > > Thank you, Dmitry

Re: [PHP-DEV] [RFC] JIT

2019-02-01 Thread Dmitry Stogov
On 2/1/19 3:29 AM, Larry Garfield wrote: > On Thursday, January 31, 2019 12:30:52 PM CST Chase Peeler wrote: >> On Thu, Jan 31, 2019 at 12:04 PM Zeev Suraski wrote: >>> On Thu, Jan 31, 2019 at 6:47 PM Kalle Sommer Nielsen >>> >>> wrote: Without my usual Windows bias, I do believe it is a

Re: [PHP-DEV] [RFC] JIT

2019-01-31 Thread Dmitry Stogov
On 1/31/19 9:12 PM, Derick Rethans wrote: > On Thu, 31 Jan 2019, Dmitry Stogov wrote: > >> >> >> On 1/31/19 8:08 PM, Derick Rethans wrote: >>> On Thu, 31 Jan 2019, Dmitry Stogov wrote: >>> >>>> I'm glad to finally propose including JIT into

Re: [PHP-DEV] [RFC] JIT

2019-01-31 Thread Dmitry Stogov
On 1/31/19 8:08 PM, Derick Rethans wrote: > On Thu, 31 Jan 2019, Dmitry Stogov wrote: > >> I'm glad to finally propose including JIT into PHP. >> >> https://wiki.php.net/rfc/jit > > I don't see anywhere in this RFC how it would affect thigns that do

Re: [PHP-DEV] RFC Abolish Narrow Margins

2019-01-31 Thread Dmitry Stogov
t being merged. I got it. Thanks. Dmitry. > > Cheers > Joe > > On Thu, 31 Jan 2019 at 17:20, Zeev Suraski <mailto:z...@php.net>> wrote: > > > > On Thu, Jan 31, 2019 at 6:09 PM Dmitry Stogov <mailto:dmi...@zend.com>> wrote: > >

Re: [PHP-DEV] [RFC] JIT

2019-01-31 Thread Dmitry Stogov
On 1/31/19 7:01 PM, Nikita Popov wrote: > On Thu, Jan 31, 2019 at 10:44 AM Dmitry Stogov <mailto:dmi...@zend.com>> wrote: > > Hi Internals, > > > I'm glad to finally propose including JIT into PHP. > > > https://wiki.php.net/rfc/jit >

Re: [PHP-DEV] RFC Abolish Narrow Margins

2019-01-31 Thread Dmitry Stogov
Hi Joe, On 1/31/19 6:56 PM, Joe Watkins wrote: > Afternoon Zeev, > >> I'll happily take your interpretation of it. No hard feelings. > > Thanks, you know I don't have another way of being :) > > When I refer to "you", I really mean you and Dmitry, while you don't have a > hive mind, you do

[PHP-DEV] Refactor zend_object_handlers API to pass zend_object* and zend_string* insted of zval(s)

2019-01-31 Thread Dmitry Stogov
Hi Nikita, We already discussed this few months ago in context of PHP-7.4. Please review the updated PR for master. https://github.com/php/php-src/pull/3780 Thanks. Dmitry.

Re: [PHP-DEV] [RFC] JIT

2019-01-31 Thread Dmitry Stogov
g" > processes that can serve multiple requests per-process. Thanks a lot! Better to try and provide feedback right now. You can get sources and build PHP from the link in RFC. https://github.com/zendtech/php-src/ Thanks. Dmitry. > > Best, > > > > On Thu, Jan 31

[PHP-DEV] [RFC] JIT

2019-01-31 Thread Dmitry Stogov
Hi Internals, I'm glad to finally propose including JIT into PHP. https://wiki.php.net/rfc/jit In the current state it may be included both into PHP-8, where we are going to continue active improvement, and into PHP-7.4, as an experimental feature. Thanks. Dmitry.

[PHP-DEV] Old style constructors in PHP-8

2019-01-30 Thread Dmitry Stogov
Hi, I've just noticed that Wordpress-4.1 on PHP master started silently produce different output. The problem that PHP master started to ignore old-style constructors. They were deprecated in PHP-7 and PHP produced the following warning Deprecated: Methods with the same name as their class

Re: [PHP-DEV] [RFC] [VOTE] FFI - Foreign Function Interface

2018-12-24 Thread Dmitry Stogov
On 12/24/18 4:50 PM, Christoph M. Becker wrote: > On 24.12.2018 at 08:38, Dmitry Stogov wrote: > >> On 12/22/18 1:32 PM, Nikita Popov wrote: >> >>> My main concern here is that this is a very new extension and I think >>> that apart from you barely anyon

Re: [PHP-DEV] [RFC][Vote] Covariant Returns and Contravariant Parameters

2018-12-24 Thread Dmitry Stogov
, but I'm definitely against this implementation. Probably, it's better to cancel the voting and restart when the implementation is ready. It's pity to see, that nobody tries the implementation but blindly vote... Thanks. Dmitry. From: Dmitry Stogov Sent: Friday

[PHP-DEV] Re: Changes to when OPcache initialises

2018-12-23 Thread Dmitry Stogov
/xdebug/xdebug/commit/3ef3c63ffc831426a45439dbf8b56b998f84d5b1 > > cheers, > Derick > > On Mon, 17 Dec 2018, Dmitry Stogov wrote: > >> Hi Derick, >> >> >> First, check why VLD works out of the box. >> >> At second, you may plug into post_start

[PHP-DEV] Re: Changes to Traits in master/PHP 7.4

2018-12-23 Thread Dmitry Stogov
Done. Thanks for noticing this. On 12/24/18 12:24 AM, Derick Rethans wrote: > Hi Dmitry, > > You removed ADD_TRAIT and BIND_TRAITS in > https://github.com/php/php-src/commit/67397970b25d03254f000c36a73204720475b324 > — could you please add that to UPGRADING.INTERNALS? > > cheers, > Derick >

Re: [PHP-DEV] [RFC] [VOTE] FFI - Foreign Function Interface

2018-12-23 Thread Dmitry Stogov
On 12/22/18 1:32 PM, Nikita Popov wrote: > On Thu, Dec 20, 2018 at 4:13 PM Dmitry Stogov <mailto:dmi...@zend.com>> wrote: > > Hi internals, > > > The FFI RFC is turned into voting state. > > > https://wiki.php.net/rfc/ffi > > >

Re: [PHP-DEV] [RFC][Vote] Covariant Returns and Contravariant Parameters

2018-12-20 Thread Dmitry Stogov
On 12/21/18 3:12 AM, Levi Morrison wrote: > On Thu, Dec 20, 2018 at 3:35 PM Dmitry Stogov wrote: >> >> Hi Levi, >> >> >> It looks like the patch broke something related to opcache. >> >> It crashes at least on Wordpress and Drupal. >> &

Re: [PHP-DEV] [RFC][Vote] Covariant Returns and Contravariant Parameters

2018-12-20 Thread Dmitry Stogov
ks. Dmitry. ____ From: Dmitry Stogov Sent: Thursday, December 20, 2018 6:26:10 PM To: Levi Morrison; internals Subject: Re: [PHP-DEV] [RFC][Vote] Covariant Returns and Contravariant Parameters Hi Levi, Please, create a Pull Request, to keep inline comments on github. Than

Re: [PHP-DEV] [RFC][Vote] Covariant Returns and Contravariant Parameters

2018-12-20 Thread Dmitry Stogov
Hi Levi, Please, create a Pull Request, to keep inline comments on github. Thanks. Dmitry. From: Levi Morrison Sent: Thursday, December 20, 2018 2:10:57 AM To: internals Subject: [PHP-DEV] [RFC][Vote] Covariant Returns and Contravariant Parameters Thank you

[PHP-DEV] [RFC] [VOTE] FFI - Foreign Function Interface

2018-12-20 Thread Dmitry Stogov
Hi internals, The FFI RFC is turned into voting state. https://wiki.php.net/rfc/ffi There were very few minor changes since the initial proposal, e.g. renaming FFI:array_type() into FFI::arrayType() Thanks. Dmitry.

[PHP-DEV] Re: Changes to when OPcache initialises

2018-12-16 Thread Dmitry Stogov
Hi Derick, First, check why VLD works out of the box. At second, you may plug into post_startup hook to reassign zend_compile after opcache. Thanks. Dmitry. From: Derick Rethans Sent: Saturday, December 15, 2018 10:01:37 PM To: Dmitry Stogov Cc: Nikita

Re: [PHP-DEV] [RFC] FFI - Foreign Function Interface

2018-12-14 Thread Dmitry Stogov
The RFC proposes ffi.enable=preload by default, that enables FFI only for CLI and preloaded scripts. Thanks. Dmitry. From: Sara Golemon Sent: Thursday, December 13, 2018 18:53 To: Anatol Belski Cc: Dmitry Stogov; PHP internals Subject: Re: [PHP-DEV] [RFC] FFI

Re: [PHP-DEV] [RFC] FFI - Foreign Function Interface

2018-12-12 Thread Dmitry Stogov
On 12/11/18 11:21 PM, Levi Morrison wrote: On Tue, Dec 11, 2018 at 11:33 AM Christoph M. Becker mailto:cmbecke...@gmx.de>> wrote: On 06.12.2018 at 17:26, Marco Pivetta wrote: > Looks very interesting, especially for simplifying the landscape of > extensions. > > Still, the amount of

Re: [PHP-DEV] [RFC] FFI - Foreign Function Interface

2018-12-12 Thread Dmitry Stogov
Hi Sara, On 12/11/18 7:19 PM, Sara Golemon wrote: On Thu, Dec 6, 2018 at 9:54 AM Dmitry Stogov mailto:dmi...@zend.com>> wrote: I would like to start discussion of FFI RFC https://wiki.php.net/rfc/ffi I said this already privately, but I just want to repeat here in the open. This

Re: [PHP-DEV] [RFC] FFI - Foreign Function Interface

2018-12-11 Thread Dmitry Stogov
few people on @internals tried it. Thanks. Dmitry. From: Marco Pivetta Sent: Thursday, December 6, 2018 7:26:57 PM To: Dmitry Stogov Cc: PHP Internals List Subject: Re: [PHP-DEV] [RFC] FFI - Foreign Function Interface Looks very interesting, especially

[PHP-DEV] [RFC] FFI - Foreign Function Interface

2018-12-06 Thread Dmitry Stogov
Hi Internals, I would like to start discussion of FFI RFC https://wiki.php.net/rfc/ffi This extension allows calling C function and accessing C data structures in pure PHP. In conjunction with preloading it gives a possibility to write PHP extension in PHP itself. The extension was tested

Re: [PHP-DEV] declare(cache=0) - explanation

2018-11-26 Thread Dmitry Stogov
On 11/26/18 2:14 PM, Nikita Popov wrote: > On Mon, Nov 26, 2018 at 10:15 AM Zeev Suraski wrote: > >> On Sun, Nov 25, 2018 at 11:43 PM Marco Pivetta wrote: >> >>> Is that space rrreally a problem? >>> >>> Take the example ZF loader from the RFC: that barely makes any difference >>> at

Re: [PHP-DEV] [mini-RFC] Disable opcache per script using "declare(cache=0)"

2018-11-25 Thread Dmitry Stogov
OK. I didn't think, this feature required explanation. I saw this like a simple way to separate "data" and "code". Anyway, now I see, this can't be accepted without RFC etc Thanks. Dmitry. From: Marco Pivetta Sent: Monday, November 26, 2018 12:43:15 AM To:

Re: [PHP-DEV] [mini-RFC] Disable opcache per script using "declare(cache=0)"

2018-11-23 Thread Dmitry Stogov
Hi Nikita, Especially, the main preload.php, usually should be marked, to disable its caching. Thanks. Dmitry. From: Nikita Popov Sent: Friday, November 23, 2018 1:08:53 PM To: Dmitry Stogov Cc: PHP internals Subject: Re: [PHP-DEV] [mini-RFC] Disable opcache

[PHP-DEV] [mini-RFC] Disable opcache per script using "declare(cache=0)"

2018-11-23 Thread Dmitry Stogov
Hi internals, I like to propose an ability to disable opcache caching per script, using declare(cache=0) at start of PHP file. The idea was inspired by preloading usage, when some scripts are actually preloading scenarios and have to be executed, but don't have to be cached.

Re: [PHP-DEV] Re: Branch off PHP-7.4 early

2018-11-16 Thread Dmitry Stogov
On 11/15/18 10:24 PM, Nikita Popov wrote: > On Thu, Nov 15, 2018 at 7:46 PM Sara Golemon wrote: > >> On Thu, Nov 15, 2018 at 10:46 AM Zeev Suraski wrote: >>> First, I think that continuously merging the level of changes we have in >>> store for PHP 8 on an ongoing basis from a branch into

Re: [PHP-DEV] [RFC] [VOTE] Preloading

2018-11-06 Thread Dmitry Stogov
On 11/6/18 2:35 PM, Christoph M. Becker wrote: > On 06.11.2018 at 12:00, Dan Ackroyd wrote: > >> On Tue, 6 Nov 2018 at 10:05, Dmitry Stogov wrote: >> >>> The preloading RFC is turned into voting state. >> Apologies if it's been asked before but from: >> >

[PHP-DEV] [RFC] [VOTE] Preloading

2018-11-06 Thread Dmitry Stogov
Hi internals, The preloading RFC is turned into voting state. https://wiki.php.net/rfc/preload Many thanks to Anatol, MZPERX and Xinchen for testing. I hope, most of the implementation issues should be fixed now. Thanks. Dmitry.

Re: [PHP-DEV] [RFC] Preloading

2018-10-29 Thread Dmitry Stogov
Yes. --rf/--rc work for preloaded classes/functions. From: Crocodile Sent: Monday, October 29, 2018 1:44:08 PM To: Dmitry Stogov Cc: Michael Wallner; Sara Golemon; PHP internals Subject: Re: [PHP-DEV] [RFC] Preloading Just a side question: will the information

Re: [PHP-DEV] [RFC] Preloading

2018-10-25 Thread Dmitry Stogov
On 10/25/18 10:47 AM, Michael Wallner wrote: > On 20/10/2018 15:06, Dmitry Stogov wrote: >> >> On Oct 19, 2018 5:20 PM, Sara Golemon wrote: >> On Fri, Oct 19, 2018 at 3:17 AM Dmitry Stogov wrote: >>> I would like to start discussion on a Preloadng RFC >&g

Re: [PHP-DEV] [RFC] Preloading

2018-10-22 Thread Dmitry Stogov
On Oct 20, 2018 11:48 PM, Benjamin Eberlei wrote: Jakub Zelenka mailto:bu...@php.net>> schrieb am Fr. 19. Okt. 2018 um 19:13: On Fri, Oct 19, 2018 at 9:17 AM Dmitry Stogov mailto:dmi...@zend.com>> wrote: > Hi Internals, > > > I would like to start discussion on

Re: [PHP-DEV] [RFC] Preloading

2018-10-22 Thread Dmitry Stogov
On Oct 21, 2018 1:29 AM, Rasmus Lerdorf wrote: On Fri, Oct 19, 2018 at 1:17 AM, Dmitry Stogov mailto:dmi...@zend.com>> wrote: I would like to start discussion on a Preloadng RFC https://wiki.php.net/rfc/preload I have been playing with this a bit this weekend. It is tricky t

Re: [PHP-DEV] [RFC] Preloading

2018-10-22 Thread Dmitry Stogov
On Oct 20, 2018 5:28 AM, Levi Morrison wrote: > I would like to start discussion on a Preloadng RFC > https://wiki.php.net/rfc/preload > > This technology would allow loading some PHP files on server startup and make > all the defined classes and functions to be permanently available in the

Re: [PHP-DEV] [RFC] Preloading

2018-10-22 Thread Dmitry Stogov
On Oct 19, 2018 9:39 PM, Rasmus Lerdorf wrote: On Fri, Oct 19, 2018 at 1:17 AM, Dmitry Stogov mailto:dmi...@zend.com>> wrote: Hi Internals, I would like to start discussion on a Preloadng RFC https://wiki.php.net/rfc/preload This technology would allow loading some PHP files on

Re: [PHP-DEV] [RFC] Preloading

2018-10-22 Thread Dmitry Stogov
On Oct 19, 2018 8:12 PM, Jakub Zelenka wrote: On Fri, Oct 19, 2018 at 9:17 AM Dmitry Stogov mailto:dmi...@zend.com>> wrote: Hi Internals, I would like to start discussion on a Preloadng RFC https://wiki.php.net/rfc/preload Nice! Apology if I missed it in the RFC but can't find in

Re: [PHP-DEV] [RFC] Preloading

2018-10-20 Thread Dmitry Stogov
On Oct 19, 2018 5:20 PM, Sara Golemon wrote: On Fri, Oct 19, 2018 at 3:17 AM Dmitry Stogov wrote: > I would like to start discussion on a Preloadng RFC > https://wiki.php.net/rfc/preload > Overall, big +1. A few questions: 1) "Only classes without unresolved parent, inte

[PHP-DEV] [RFC] Preloading

2018-10-19 Thread Dmitry Stogov
Hi Internals, I would like to start discussion on a Preloadng RFC https://wiki.php.net/rfc/preload This technology would allow loading some PHP files on server startup and make all the defined classes and functions to be permanently available in the context of future request (without any

Re: [PHP-DEV] die('zend_mm_heap corrupted'); // TODO: Better error message

2018-10-09 Thread Dmitry Stogov
Hi Rowan, This error message is triggered when Zend MM used in improper way, e.g. invalid pointer free, etc. MM can't provide useful information about the context and reason. The best way to find the reason of the problem is running php under valgrind. $ USE_ZEND_ALLOC=0 valgrind php ...

Re: [PHP-DEV] Re: Mysterious (to me) Xdebug issue with PHP 7.3

2018-09-05 Thread Dmitry Stogov
I hope, it's fixed now. Please verify. Dmitry. From: Dmitry Stogov Sent: Wednesday, September 5, 2018 1:36:33 PM To: Derick Rethans Cc: PHP Developers Mailing List Subject: Re: [PHP-DEV] Re: Mysterious (to me) Xdebug issue with PHP 7.3 I see the problem

Re: [PHP-DEV] Re: Mysterious (to me) Xdebug issue with PHP 7.3

2018-09-05 Thread Dmitry Stogov
I see the problem, and most probably, it has to be fixed in PHP sources. I'll try to take a deeper look today evening. Thanks. Dmitry. From: Derick Rethans Sent: Wednesday, September 5, 2018 12:27:56 PM To: Dmitry Stogov Cc: PHP Developers Mailing List Subject

[PHP-DEV] Re: Mysterious (to me) Xdebug issue with PHP 7.3

2018-09-05 Thread Dmitry Stogov
From: Derick Rethans Sent: Tuesday, September 4, 2018 7:26:49 PM To: Dmitry Stogov Cc: PHP Developers Mailing List Subject: Mysterious (to me) Xdebug issue with PHP 7.3 Hi, I'm finalizing Xdebug support for PHP 7.3, and although I have fixed many things, there is one thing that is (curre

[PHP-DEV] Re: ZEND_ACC_* flags

2018-07-25 Thread Dmitry Stogov
. From: Stanislav Malyshev Sent: Wednesday, July 25, 2018 9:35:11 PM To: Dmitry Stogov; Christoph M. Becker; PHP internals list Cc: Nikita Popov Subject: Re: ZEND_ACC_* flags Hi! > I tried to fix ZEND_ACC_* flags mess. > > > https://gist.github.com/dstogov/3b6ae377c17524b21967

[PHP-DEV] ZEND_ACC_* flags

2018-07-25 Thread Dmitry Stogov
Hi, I tried to fix ZEND_ACC_* flags mess. https://gist.github.com/dstogov/3b6ae377c17524b219670960cf98f8c1 The patch specifies flags meaning, and reorder them according to meaning and frequency of usage (this allows generation of shorter instructions on x86). Unfortunately, the patch

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

2018-07-19 Thread Dmitry Stogov
I've run few benchmarks, to measure the performance penalty of this proposal. https://gist.github.com/dstogov/b9fc0fdccfb8bf7bae121ce3d3ff1db1 In most cases real-life apps become ~1% slower. In the worst case, I got 6% slowdown (on mediawiki). Thanks. Dmitry.

Re: [PHP-DEV] re2c version(s)

2018-07-13 Thread Dmitry Stogov
Hi Nikita, OK. Dropping files and requirement for re2c 1.0.0. Right? Thanks. Dmitry. From: Nikita Popov Sent: Friday, July 13, 2018 12:26:22 PM To: Dmitry Stogov Cc: PHP internals list; Stanislav Malyshev; der...@derickrethans.nl; Christoph M. Becker Subject

[PHP-DEV] re2c version(s)

2018-07-13 Thread Dmitry Stogov
Hi, I think, many core developers saw unexpected changes in "zend_labguages_scanner.c" or "var_unserializer.c" after rebuilds. This occurs, because we use different versions of re2c, and some of them produce really different code. They also embed version number into the generate source.

Re: [PHP-DEV] PHP 2^3

2018-06-27 Thread Dmitry Stogov
Hi Niklas, On Jun 26, 2018 11:36 PM, Niklas Keller wrote: Hey Dmitry, > > hi Aaron, > > > On Jun 25, 2018 10:49 PM, Aaron Piotrowski wrote: > > > On Jun 25, 2018, at 7:30 AM, Zeev Suraski wrote: > > > > > > 2. Better support long-running, async-based, microservices-focused > > execution

Re: [PHP-DEV] PHP 2^3

2018-06-26 Thread Dmitry Stogov
hi Aaron, On Jun 25, 2018 10:49 PM, Aaron Piotrowski wrote: > On Jun 25, 2018, at 7:30 AM, Zeev Suraski wrote: > > > 2. Better support long-running, async-based, microservices-focused execution > model. It's probably no secret that one of the key reasons Node is gaining > popularity is

Re: [PHP-DEV] [VOTE] Make compact function reports undefined passed variables

2018-06-13 Thread Dmitry Stogov
On Jun 10, 2018 10:46 PM, "Hoffman, Zachary Robert" wrote: >The existence of anything that internally relies on `get_defined_vars()` is a >blocker for applying further optimisations to the engine (think stack frames), >which is probably why Dmitry suggested its removal. I did not know it was

Re: [PHP-DEV] [VOTE] Make compact function reports undefined passed variables

2018-06-09 Thread Dmitry Stogov
Hi Gabriel, compact(), extract(), parse_str() (with 1 argument) and get_defined_vars() are bad functions, because they access local variables indirectly. They might be considered to be removed in the next major PHP version, despite of this fix. Thanks. Dmitry.

Re: [PHP-DEV] PHP FFI extenesion

2018-04-27 Thread Dmitry Stogov
Pre-loading of *.h files is fully functional now. See tests/300.phpt From: Dmitry Stogov <dmi...@zend.com> Sent: Friday, April 27, 2018 1:29:48 AM To: Michael Wallner Cc: Stanislav Malyshev; Zeev Suraski; Xinchen Hui; Nikita Popov; Bob Weinand; Anatol

Re: [PHP-DEV] PHP FFI extenesion

2018-04-26 Thread Dmitry Stogov
/75cdae7a26406ae75ee27317ddb1981774a81006 Thanks. Dmitry. From: Michael Wallner <mike.php@gmail.com> on behalf of Michael Wallner <m...@php.net> Sent: Thursday, April 26, 2018 10:30:38 PM To: Dmitry Stogov Cc: Stanislav Malyshev; Zeev Suraski; Xinchen Hui;

Re: [PHP-DEV] PHP FFI extenesion

2018-04-26 Thread Dmitry Stogov
_handler(). Why not to call a general function handler in first place (without any ffi magic)? Thanks. Dmitry. ________ From: Dmitry Stogov Sent: Thursday, April 26, 2018 12:25:37 PM To: Michael Wallner Cc: Dmitry Stogov; Stanislav Malyshev; Zeev Suraski; Xinchen Hui; Nikita Pop

Re: [PHP-DEV] PHP FFI extenesion

2018-04-26 Thread Dmitry Stogov
hi Michael, On Apr 26, 2018 10:31 AM, Michael Wallner <m...@php.net> wrote: Hey Dmitry! On 17/04/18 09:29, Dmitry Stogov wrote: > hi Michael, > > it's pitty, I didn't found this extension before. > thanks for pointing, I'll definetly take a look. Did you have a chance to loo

[PHP-DEV] Re: FPM preloading of PHP files

2018-04-20 Thread Dmitry Stogov
This makes sense. From: jakub@gmail.com <jakub@gmail.com> on behalf of Jakub Zelenka <bu...@php.net> Sent: Friday, April 20, 2018 1:04:01 PM To: Dmitry Stogov Cc: PHP internals list Subject: Re: FPM preloading of PHP files Hi Dmitry, On

[PHP-DEV] Re: FPM preloading of PHP files

2018-04-20 Thread Dmitry Stogov
. From: jakub@gmail.com <jakub@gmail.com> on behalf of Jakub Zelenka <bu...@php.net> Sent: Wednesday, April 18, 2018 8:18:33 PM To: Dmitry Stogov Cc: PHP internals list Subject: Re: FPM preloading of PHP files Hi Dmitry On Tue, Apr 17, 2018 at 5:44 PM, Dmitry Stogov <

[PHP-DEV] Re: FPM preloading of PHP files

2018-04-17 Thread Dmitry Stogov
ars ago, I developed something similar for PHP-5. Thanks. Dmitry. From: jakub@gmail.com <jakub@gmail.com> on behalf of Jakub Zelenka <bu...@php.net> Sent: Tuesday, April 17, 2018 5:23:30 PM To: Dmitry Stogov Cc: PHP internals list Subject: FPM prelo

Re: [PHP-DEV] PHP FFI extenesion

2018-04-17 Thread Dmitry Stogov
:32 AM To: Dmitry Stogov Cc: Stanislav Malyshev; Zeev Suraski; Xinchen Hui; Nikita Popov; Bob Weinand; Anatol Belski (a...@php.net); PHP internals list Subject: Re: [PHP-DEV] PHP FFI extenesion 2018-04-17 9:46 GMT+02:00 Dmitry Stogov <dmi...@zend.com<mailto:dmi...@zend.com>>: Hi Michal

Re: [PHP-DEV] PHP FFI extenesion

2018-04-17 Thread Dmitry Stogov
l 17, 2018 10:24:02 AM To: Dmitry Stogov Cc: Stanislav Malyshev; Zeev Suraski; Xinchen Hui; Nikita Popov; Bob Weinand; Anatol Belski (a...@php.net); PHP internals list Subject: Re: [PHP-DEV] PHP FFI extenesion Hi Dmitry! I am not much experienced with C but as a user, I'm just wondering if t

Re: [PHP-DEV] PHP FFI extenesion

2018-04-17 Thread Dmitry Stogov
hi Michael, it's pitty, I didn't found this extension before. thanks for pointing, I'll definetly take a look. I, also, like the idea of preloading ffi definitions on startup, but I would prefer to allow preloading any php files. Especially for FFI, PHP wrappers would able to hide dangerous

Re: [PHP-DEV] PHP FFI extenesion

2018-04-17 Thread Dmitry Stogov
On Apr 17, 2018 2:49 AM, Stanislav Malyshev wrote: Hi! > I've spent some time thinking about simple FFI for PHP, and finally, borrowed > most ideas from LuaJIT. > > This is an initial PoC. It was tested on Linux only. > > > https://github.com/dstogov/php-ffi > > > I would

Re: [PHP-DEV] PHP FFI extenesion

2018-04-13 Thread Dmitry Stogov
:39:58 PM To: Dmitry Stogov Cc: Zeev Suraski; Xinchen Hui; Nikita Popov; Bob Weinand; Anatol Belski (a...@php.net); PHP internals list Subject: Re: [PHP-DEV] PHP FFI extenesion 2018-04-13 16:27 GMT+03:00 Dmitry Stogov <dmi...@zend.com<mailto:dmi...@zend.com>>: Hi, I've spent some t

[PHP-DEV] PHP FFI extenesion

2018-04-13 Thread Dmitry Stogov
Hi, I've spent some time thinking about simple FFI for PHP, and finally, borrowed most ideas from LuaJIT. This is an initial PoC. It was tested on Linux only. https://github.com/dstogov/php-ffi I would appreciate review, comments and ideas about missing features and functionality.

[PHP-DEV] Packed Strings

2017-11-27 Thread Dmitry Stogov
Hi, I spent some time, reviewing an old Andrea's idea about packed strings. https://github.com/hikari-no-yume/php-src/tree/packedStrings The idea is simple. In every place were we use zend_string*, we may store characters directly. We use low byte to encode packed string marker and string

[PHP-DEV] Re: Minor BC break in gettype()

2017-11-19 Thread Dmitry Stogov
I think PHP 7.2 is a good place for these minor break. Dmitry. From: Sara Golemon <p...@golemon.com> Sent: Saturday, November 18, 2017 12:17:24 PM To: Dmitry Stogov; internals@lists.php.net Subject: Minor BC break in gettype() https://3v4l.org/kRON7

Re: [PHP-DEV] RFC - Zend VM Pause API

2017-11-01 Thread Dmitry Stogov
, the implementation is really interesting, and I'm glad, someone is working on this. Thanks. Dmitry. From: Haitao Lv <i...@lvht.net> Sent: Wednesday, November 1, 2017 12:45:13 PM To: Dmitry Stogov Cc: PHP Internals Subject: Re: [PHP-DEV] RFC - Zend VM Pause API T

Re: [PHP-DEV] RFC - Zend VM Pause API

2017-11-01 Thread Dmitry Stogov
or just change execute_data->opline... From: Dmitry Stogov Sent: Wednesday, November 1, 2017 12:14:22 PM To: Haitao Lv Cc: PHP Internals Subject: Re: [PHP-DEV] RFC - Zend VM Pause API after zend_interrupt_function() callback VM continues execution using

Re: [PHP-DEV] RFC - Zend VM Pause API

2017-11-01 Thread Dmitry Stogov
; Sent: Wednesday, November 1, 2017 11:54:54 AM To: Dmitry Stogov Cc: PHP Internals Subject: Re: [PHP-DEV] RFC - Zend VM Pause API It seems that set EG(vm_interrupt) to 1 could not stop the vm execution but only execute the interrupt_function and continue the current execution. However, my RFC propose t

Re: [PHP-DEV] RFC - Zend VM Pause API

2017-11-01 Thread Dmitry Stogov
Hi, It should be possible do similar things using EG(vm_interrupt) and zend_interrupt_function() callback (introduced in php-7.1) ext/pcntl implements asynchronous signal handling using this. Thanks. Dmitry. From: Haitao Lv Sent: Wednesday,

Re: [PHP-DEV] Apply substr() optimization to array_slice()

2017-10-30 Thread Dmitry Stogov
HP Internals; Dmitry Stogov Subject: Re: [PHP-DEV] Apply substr() optimization to array_slice() On Fri, Oct 27, 2017 at 12:10 PM, Nikita Popov <nikita@gmail.com> wrote: > On Fri, Oct 27, 2017 at 4:16 PM, Sara Golemon <poll...@php.net> wrote: >> >> On Fri, Oct 27,

Re: [PHP-DEV] Weird PHP 7.2 bug

2017-10-30 Thread Dmitry Stogov
Thanks. Dmitry. From: Xinchen Hui <larue...@php.net> Sent: Monday, October 30, 2017 10:05:30 AM To: Derick Rethans Cc: Dmitry Stogov; Nikita Popov; PHP Developers Mailing List Subject: Re: [PHP-DEV] Weird PHP 7.2 bug Hey: On Mon, Oct 30, 2017 at 2:48 AM, Derick Rethans <der...@php.n

[PHP-DEV] Re: Fix for unserialise() "vulnerabilities"

2017-10-12 Thread Dmitry Stogov
On Oct 12, 2017 6:01 PM, Nikita Popov <nikita@gmail.com> wrote: On Thu, Oct 12, 2017 at 4:38 PM, Dmitry Stogov <dmi...@zend.com<mailto:dmi...@zend.com>> wrote: Hi, I've found, that at least half of unserialise() security problems, occurs because of non-symmetric ser

[PHP-DEV] Fix for unserialise() "vulnerabilities"

2017-10-12 Thread Dmitry Stogov
Hi, I've found, that at least half of unserialise() security problems, occurs because of non-symmetric serialize/unserialize assumption, regarding references encoded with "r". serialize() assumes it's an object. https://github.com/php/php-src/blob/master/ext/standard/var.c#L828

Re: [PHP-DEV] PCRE JIT broken in PHP 7.2

2017-09-18 Thread Dmitry Stogov
This commit should fix the problem https://github.com/php/php-src/commit/5ef10d08ec2d0823fb21ad189dacfb43d900a0b5 Thanks. Dmitry. From: Dmitry Stogov <dmi...@zend.com> Sent: Monday, September 18, 2017 7:29:24 PM To: Giovanni Giacobbi; PHP Internals List S

Re: [PHP-DEV] PCRE JIT broken in PHP 7.2

2017-09-18 Thread Dmitry Stogov
The problem may be caused by "incorrect" dynamic linking to different libpcre instances. e.g one libbcre is use by Apache or some Apache module and another is embedded into PHP. The backtrace would be useful, to prove this guess. Thanks. Dmitry. From:

Re: [PHP-DEV] 7.2 behavior break, Bug #74836 isset on zero-prefixed numeric indexes in array broken

2017-07-03 Thread Dmitry Stogov
com> Sent: Tuesday, July 4, 2017 3:23:27 AM To: Dmitry Stogov; nikita@gmail.com; Sara Golemon; Bob Weinand Cc: PHP internals list Subject: Re: [PHP-DEV] 7.2 behavior break, Bug #74836 isset on zero-prefixed numeric indexes in array broken Hi! > > Please take a look at https://bugs.php.ne

[PHP-DEV] 7.2 behavior break, Bug #74836 isset on zero-prefixed numeric indexes in array broken

2017-07-03 Thread Dmitry Stogov
Hi, Please take a look at https://bugs.php.net/bug.php?id=74836 What is the best option to fix this? The most consistent way, from my point of view - disabling zero-prefexed numeric strings in all cases, but this is a new behavior break. Thanks. Dmitry.

Re: [PHP-DEV] [RFC][VOTE] Add support for stream-wrapped URLs in opcode cache

2017-06-23 Thread Dmitry Stogov
Laupretre <franc...@tekwire.net> Sent: Thursday, June 22, 2017 4:32:13 PM To: Dmitry Stogov; Internals Subject: Re: [PHP-DEV] [RFC][VOTE] Add support for stream-wrapped URLs in opcode cache Hi Dmitry, Le 22/06/2017 à 09:42, Dmitry Stogov a écrit : The PR is incomplete, so I can't test an

Re: [PHP-DEV] [RFC][VOTE] Add support for stream-wrapped URLs in opcode cache

2017-06-22 Thread Dmitry Stogov
hi François, The PR is incomplete, so I can't test and even understand the idea completely. In my opinion, user defined streams can't be cached, because the wrapper code itself may be changed from request to request. -1 Thanks. Dmitry. From: François

[PHP-DEV] Request shutdown optimization

2017-06-22 Thread Dmitry Stogov
hi, could you, please, review the PR https://github.com/php/php-src/pull/2591 The main idea is not to free request-allocated zvals, because they are freed by Zend MM anyway. Also, shutdown_executor() code was simplified by calling destructors and closing resources, before freeing data.

Re: [PHP-DEV] Hashtable collision resolution in PHP 7

2017-05-16 Thread Dmitry Stogov
PHP 7 still uses a kind of linked list for collision resolution (trough zval.u2.next) and this is still an expensive operation. From: Pawel Por Sent: Tuesday, May 16, 2017 12:28:36 PM To: internals@lists.php.net Subject: [PHP-DEV] Hashtable

Re: [PHP-DEV] HYBRID VM

2017-05-15 Thread Dmitry Stogov
Hi Derick, Sorry, it seems I tested it improperly. Anyway, I found and fixed the problem. It was a bug in USER_OPCODE handling in HYBRID VM. Thanks. Dmitry. From: Derick Rethans <der...@php.net> Sent: Monday, May 15, 2017 6:32:19 PM To: Dmitry Stogov C

[PHP-DEV] HYBRID VM

2017-05-15 Thread Dmitry Stogov
Hi, Recently, I committed HYBRID VM into master, but didn't enable it by default yet. It provides significant performance improvement on small benchmarks (1.5 times faster on bench.php) and slight improvement on real-life apps (1-2% on wordpress). Currently it improves PHP only on x86,

Re: [PHP-DEV] HYBRID VM

2017-05-05 Thread Dmitry Stogov
:26 PM, Matt Wilmas <php_li...@realplain.com> wrote: Hi Dmitry, - Original Message - From: "Dmitry Stogov" Sent: Wednesday, May 03, 2017 > Hi, > > > I propose a new VM instruction dispatch technique, that provides great > speed up on small benchmarks (1.5 t

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