Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
osure are by-value, so I can't > see what side effects you might be thinking of ? > It's clear to me that foo() will return NULL, but how many warnings about unused variable $y will we get? Thanks. Dmitry. > > Cheers > Joe > > On Tue, Sep 22, 2015 at 9:25 AM, Dmitry Stogov <dm

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: Added an experemental ability to move PHP code pages (PHP TEXT segment) into HUGE pages. PHP should be configured and built with --enable-huge-code-pages, OS s

2015-09-15 Thread Dmitry Stogov
On Tue, Sep 15, 2015 at 4:31 AM, Rasmus Lerdorf <ras...@lerdorf.com> wrote: > On 09/14/2015 02:13 PM, Anatol Belski wrote: > > > > > >> -Original Message- > >> From: Dmitry Stogov [mailto:dmi...@zend.com] > >> Sent: Monday, September

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: Added an experemental ability to move PHP code pages (PHP TEXT segment) into HUGE pages. PHP should be configured and built with --enable-huge-code-pages, OS s

2015-09-15 Thread Dmitry Stogov
On Tue, Sep 15, 2015 at 11:24 AM, Rasmus Lerdorf <ras...@lerdorf.com> wrote: > On 09/14/2015 11:58 PM, Dmitry Stogov wrote: > > On Tue, Sep 15, 2015 at 4:31 AM, Rasmus Lerdorf <ras...@lerdorf.com > > <mailto:ras...@lerdorf.com>> wrote: > > Redhat ena

[PHP-DEV] Re: [PHP-CVS] com php-src: Added an experemental ability to move PHP code pages (PHP TEXT segment) into HUGE pages. PHP should be configured and built with --enable-huge-code-pages, OS shoul

2015-09-14 Thread Dmitry Stogov
e hits 231,287,491,307 cycles 107.742837269 seconds time elapsed May be we should enable this by default in RC (may be also file cache) and make decision based on feedback? Thanks. Dmtiry. On Mon, Sep 14, 2015 at 1:34 PM, Dmitry Stogov <dmi...@php.net> wrot

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: Added an experemental ability to move PHP code pages (PHP TEXT segment) into HUGE pages. PHP should be configured and built with --enable-huge-code-pages, OS s

2015-09-14 Thread Dmitry Stogov
On Mon, Sep 14, 2015 at 11:05 PM, Anatol Belski <anatol@belski.net> wrote: > Hi Dmitry, > > > -Original Message- > > From: Dmitry Stogov [mailto:dmi...@zend.com] > > Sent: Monday, September 14, 2015 12:58 PM > > To: Anatol Belski <a...@php.ne

[PHP-DEV] Re: object_properties_load() does not work for non-string keys - intentional?

2015-09-02 Thread Dmitry Stogov
Hi Stas, I don't see the crash. Integer keys are supported in exactly the same way as it was in PHP-5. $ sapi/cli/php -r '$a = [1=>5]; $o = (object)$a; var_dump($o); $s = serialize($o); var_dump($s);var_dump(unserialize($s));' object(stdClass)#1 (1) { [1]=> int(5) } string(27)

[PHP-DEV] Disable SAPI based HANDLE_BLOCK_INTERRUPTIONS()

2015-08-28 Thread Dmitry Stogov
corresponding API in zend.h and SAPI.h. Thanks. Dmitry -- Forwarded message -- From: Dmitry Stogov dmi...@php.net Date: Fri, Aug 28, 2015 at 4:10 PM Subject: [PHP-CVS] com php-src: HANDLE_BLOCK_INTERRUPTIONS() is not used by SAPIs anymore. It may be useful only when PHP configured

Re: [PHP-DEV] Overflow checks and integral vars comparison

2015-08-25 Thread Dmitry Stogov
Hi Anatol, I don't see any problem adding ZEND_LONG_INT_OVF and similar macros into 7.0. Thanks. Dmitry. On Mon, Aug 24, 2015 at 5:15 PM, Anatol Belski anatol@belski.net wrote: Hi Rowan, -Original Message- From: Rowan Collins [mailto:rowan.coll...@gmail.com] Sent: Monday,

Re: [PHP-DEV] Re: Marking error, etc. functions as cold?

2015-08-19 Thread Dmitry Stogov
Hi Matt, On Wed, Aug 19, 2015 at 4:05 PM, Matt Wilmas php_li...@realplain.com wrote: Hi Dmitry, - Original Message - From: Dmitry Stogov Sent: Monday, August 17, 2015 This is good idea. Some times ago I played with hot attribute, and didn't get any improvement, but we really may

[PHP-DEV] Re: Marking error, etc. functions as cold?

2015-08-17 Thread Dmitry Stogov
This is good idea. Some times ago I played with hot attribute, and didn't get any improvement, but we really may get something with cold. Thanks. Dmitry. On Mon, Aug 17, 2015 at 1:26 PM, Matt Wilmas php_li...@realplain.com wrote: Hi Dmitry, all, Has it been considered to use

Re: [PHP-DEV] Parameter parsing for zval type?

2015-08-17 Thread Dmitry Stogov
On Thu, Aug 13, 2015 at 1:12 AM, Matt Wilmas php_li...@realplain.com wrote: H Dmitry, - Original Message - From: Dmitry Stogov Sent: Tuesday, August 11, 2015 On Tue, Aug 11, 2015 at 11:10 PM, Matt Wilmas php_li...@realplain.com wrote: [...] Look at e.g. is_numeric() or strpos

Re: [PHP-DEV] Parameter parsing for zval type?

2015-08-11 Thread Dmitry Stogov
Hi Matt, On Tue, Aug 11, 2015 at 9:00 PM, Matt Wilmas php_li...@realplain.com wrote: Hi again, - Original Message - From: Matt Wilmas Sent: Tuesday, August 11, 2015 Hi Dmitry, all, Help me understand this. :-) It's been more puzzling to me recently since just coming to the

Re: [PHP-DEV] Parameter parsing for zval type?

2015-08-11 Thread Dmitry Stogov
On Tue, Aug 11, 2015 at 11:10 PM, Matt Wilmas php_li...@realplain.com wrote: Hi Dmitry, - Original Message - From: Dmitry Stogov Sent: Tuesday, August 11, 2015 Hi Matt, On Tue, Aug 11, 2015 at 9:00 PM, Matt Wilmas php_li...@realplain.com wrote: Hi again, - Original

Re: [PHP-DEV] Introduction and some opcache SSE related stuff

2015-08-03 Thread Dmitry Stogov
I can confirm minor but consistent speed up on applications with big code base. The PR was merged into master. Thanks. Dmitry. On Fri, Jul 31, 2015 at 5:26 PM, Andone, Bogdan bogdan.and...@intel.com wrote: Running php-cgi -T1 on WordPress4.1/index.php I see ~1% performance increase for

Re: [PHP-DEV] Move to Fast ZPP?

2015-08-03 Thread Dmitry Stogov
Hi Matt, On Wed, Jul 22, 2015 at 11:16 PM, Matt Wilmas php_li...@realplain.com wrote: Hi again Dmitry, all, Hopefully the final update on this, before all is revealed... :-) - Original Message - From: Matt Wilmas Sent: Tuesday, July 07, 2015 Hi again Dmitry, all, [...] Just

Re: [PHP-DEV] Introduction and some opcache SSE related stuff

2015-07-30 Thread Dmitry Stogov
Hi Bogdan, On Wed, Jul 29, 2015 at 5:22 PM, Andone, Bogdan bogdan.and...@intel.com wrote: Hi Guys, My name is Bogdan Andone and I work for Intel in the area of SW performance analysis and optimizations. We would like to actively contribute to Zend PHP project and to involve ourselves in

Re: [PHP-DEV] Introduction and some opcache SSE related stuff

2015-07-30 Thread Dmitry Stogov
On Jul 31, 2015 2:12 AM, Matt Wilmas php_li...@realplain.com wrote: Hi Dmitry, Bogdan, - Original Message - From: Dmitry Stogov Sent: Thursday, July 30, 2015 Hi Bogdan, On Wed, Jul 29, 2015 at 5:22 PM, Andone, Bogdan bogdan.and...@intel.com wrote: Hi Guys, My name is Bogdan

Re: [PHP-DEV] Compiling with gcc -m32 on x86_64

2015-07-18 Thread Dmitry Stogov
I use 'CC=gcc -m32 ./configure' to build 32-bit PHP on 64-bit Linux. This works fine, if you have all necessary 32-bit libraries and dev packages. Thanks. Dmitry. On Jul 10, 2015 11:14 PM, Bishop Bettini bis...@php.net wrote: Hi! Is it expected that compiling as 32-bit on 64-bit will succeed?

Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-07-02 Thread Dmitry Stogov
On Thu, Jul 2, 2015 at 3:26 AM, Bob Weinand bobw...@hotmail.com wrote: Am 29.06.2015 um 19:14 schrieb Andrea Faulds a...@ajf.me: Hi again, On 29 Jun 2015, at 18:02, Bob Weinand bobw...@hotmail.com wrote: Yes, it generally makes sense... Then I have other questions: - Why do we

[PHP-DEV] Re: Fixes for #69900 and #69963

2015-06-30 Thread Dmitry Stogov
Hi Anatol, I don't see any problems committing this. Thanks. Dmitry. On Tue, Jun 30, 2015 at 9:41 PM, Anatol Belski anatol@belski.net wrote: Hi, regarding the mentioned tickets I've prepared a patch https://github.com/php/php-src/compare/master...weltling:pipe_blocking_win .

Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-06-30 Thread Dmitry Stogov
I, personally, don't have strong opinion. Both behaviors work for me. Bob, if you are going to change this, please show the patch first. Thanks. Dmitry. On Mon, Jun 29, 2015 at 8:14 PM, Andrea Faulds a...@ajf.me wrote: Hi again, On 29 Jun 2015, at 18:02, Bob Weinand bobw...@hotmail.com

[PHP-DEV] Re: Improved zend_string API

2015-06-29 Thread Dmitry Stogov
. It will be a separate optional commit. You’ll see if time allows to include it. Anyway, this mustn’t be blocking inclusion in 7.0. Regards François *De :* Anatol Belski [mailto:anatol@belski.net] *Envoyé :* vendredi 26 juin 2015 21:16 *À :* 'Dmitry Stogov'; 'francois' *Cc :* 'Anatol

Re: [PHP-DEV] Move to Fast ZPP?

2015-06-29 Thread Dmitry Stogov
On Sat, Jun 27, 2015 at 12:36 AM, Matt Wilmas php_li...@realplain.com wrote: Hi Dmitry, all, - Original Message - From: Dmitry Stogov Sent: Thursday, June 25, 2015 On Wed, Jun 24, 2015 at 1:35 PM, Matt Wilmas php_li...@realplain.com wrote: Hi Dmitry, all, - Original

[PHP-DEV] Re: [PHP-CVS] com php-src: Executor cleanup: fix GOTO and SWITCH VMs, remove aility to build additional PHP-5.0 compatible VM, hide executor implementation details.: Zend/zend_compile.h Zend

2015-06-26 Thread Dmitry Stogov
xdebug_check_branch_entry_handler(ZEND_OPCODE_HANDLER_ARGS) Is there a different way for declaring/defining these functions now? (I could just expand the ZEND_OPCODE_HANDLER_ARGS macro myself, but that's cheating... cheers, Derick On Thu, 12 Mar 2015, Dmitry Stogov wrote: Commit

[PHP-DEV] Re: Improved zend_string API

2015-06-26 Thread Dmitry Stogov
Hi Francois, From the source code review, I don't see any problems. May be too aggressive usage of inline functions in zend_string implementation, but I hope, it shouldn't make any harm. I'll need to check, if C compilers are smart enough to produce good optimized code after inlining. In general

[PHP-DEV] Re: [PHP-CVS] com php-src: Executor cleanup: fix GOTO and SWITCH VMs, remove aility to build additional PHP-5.0 compatible VM, hide executor implementation details.: Zend/zend_compile.h Zend

2015-06-26 Thread Dmitry Stogov
On Fri, Jun 26, 2015 at 2:11 PM, Derick Rethans der...@php.net wrote: On Fri, 26 Jun 2015, Dmitry Stogov wrote: You shouldn't use opcode handlers directly, we have a use USER_OPCODE API. typedef int (*user_opcode_handler_t) (zend_execute_data *execute_data); #define

Re: [PHP-DEV] Move to Fast ZPP?

2015-06-25 Thread Dmitry Stogov
On Wed, Jun 24, 2015 at 1:35 PM, Matt Wilmas php_li...@realplain.com wrote: Hi Dmitry, all, - Original Message - From: Dmitry Stogov Sent: Wednesday, June 24, 2015 We should NOT use it everywhere. It'll lead to code bloat. Thanks. Dmitry. On Wed, Jun 24, 2015 at 12:21 PM

Re: [PHP-DEV] Allow exceptions in __toString()

2015-06-25 Thread Dmitry Stogov
On Thu, Jun 25, 2015 at 4:55 PM, Johannes Schlüter johan...@schlueters.de wrote: On Thu, 2015-06-25 at 14:52 +0200, Nikita Popov wrote: However what it doesn't do, and what I wouldn't consider feasible to do, is ensure that every single string conversion in library functions is exception

Re: [PHP-DEV] Move to Fast ZPP?

2015-06-25 Thread Dmitry Stogov
On Wed, Jun 24, 2015 at 1:08 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Dmitry, On Wed, Jun 24, 2015 at 7:04 PM, Dmitry Stogov dmi...@zend.com wrote: We should NOT use it everywhere. It'll lead to code bloat. OK. Thank you. I'll use it only for functions called many times. e.g

[PHP-DEV] Re: com php-src: Fixed bug #69756 (Fatal error: Nesting level too deep -recursive dependency? with ===): Zend/bug69756.phpt Zend/zend_hash.c

2015-06-25 Thread Dmitry Stogov
yeah. thanks for catching this. moved. Thanks. Dmitry. On Thu, Jun 25, 2015 at 2:06 AM, Christoph Becker cmbecke...@gmx.de wrote: Dmitry Stogov wrote: Commit:ed5fbf5e49eab435cd7a0a9a5627698de92887c1 Author:Dmitry Stogov dmi...@zend.com Fri, 5 Jun 2015 10:04:58 +0300

Re: [PHP-DEV] Move to Fast ZPP?

2015-06-24 Thread Dmitry Stogov
/rfc/fast_zpp Last year's Dmirty's commit message say, it should only applied to most used functions due to the state of Fast ZPP. commit 27f38798a1963de1c60aae4ef8a3675138255574 Author: Dmitry Stogov dmi...@zend.com Date: Fri Jul 11 16:32:20 2014 +0400 Fast parameter

Re: [PHP-DEV] hasType() for internal function parameters?

2015-06-22 Thread Dmitry Stogov
On Mon, Jun 22, 2015 at 5:23 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 06/22/2015 05:11 AM, Dmitry Stogov wrote: Hi Rasmus, Your latest changes broke more than 100 tests. Sorry, but I had to revert your commits and related Bob's fixes. You may find them in internal-arg-info

Re: [PHP-DEV] hasType() for internal function parameters?

2015-06-22 Thread Dmitry Stogov
Hi Rasmus, Your latest changes broke more than 100 tests. Sorry, but I had to revert your commits and related Bob's fixes. You may find them in internal-arg-info branch. Please, don't do experiments on the common code base at beta stage. On the other hand, I don't see a big problem committing

Re: [PHP-DEV] hasType() for internal function parameters?

2015-06-22 Thread Dmitry Stogov
On Mon, Jun 22, 2015 at 8:35 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 06/22/2015 01:27 PM, Dmitry Stogov wrote: Actually, when you added type hints, php compiler stopped optimizing and using ZEND_DEFINED (and others) instead of internal function calls, but of course this shouldn't

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: Make CALL VM with FP and IP in global registers not to return anything from opcode handlers. Set OPLINE to NULL to terminate VM loop instead. This saves 1 CPU

2015-06-16 Thread Dmitry Stogov
right. thanks. Dmitry. On Tue, Jun 16, 2015 at 3:20 PM, Matt Wilmas php_li...@realplain.com wrote: Hi Dmitry, - Original Message - From: Dmitry Stogov Sent: Tuesday, June 16, 2015 Commit:48ed660cdf6fe94ac2cd8eac217ea97340766e75 Author:Dmitry Stogov dmi...@zend.com

Re: [PHP-DEV] Packed array is not fast?

2015-06-16 Thread Dmitry Stogov
:28 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Dmitry, On Mon, Jun 15, 2015 at 6:06 PM, Dmitry Stogov dmi...@zend.com wrote: I see only the test for packed array. You may create similar hash array, initializing it in reverse order. It's better approach to see the difference because

Re: [PHP-DEV] [RFC] Throwable Interface

2015-06-15 Thread Dmitry Stogov
Hi, I made a quick code review, and I don't see any technical problems in implementation. 1) Anyway, I think it's a bad idea to rename EngineException (and others) into Error(s). This will prevent using class Error in applications, and may potentially break some of them. I also don't like

Re: [PHP-DEV] Packed array is not fast?

2015-06-15 Thread Dmitry Stogov
I see only the test for packed array. You may create similar hash array, initializing it in reverse order. In my experiments packed arrays are slightly (8%) faster. $ sapi/cli/php packed.php Time: 0.022471189498901 Time: 0.012310028076172 $ sapi/cli/php hash.php Time: 0.024425029754639 Time:

Re: [PHP-DEV] [RFC] Throwable Interface

2015-06-15 Thread Dmitry Stogov
On Mon, Jun 15, 2015 at 4:55 PM, Aaron Piotrowski aa...@icicle.io wrote: On Jun 15, 2015, at 6:56 AM, Anatol Belski anatol@belski.net wrote: Hi Dmitry, -Original Message- From: Dmitry Stogov [mailto:dmi...@zend.com dmi...@zend.com] Sent: Monday, June 15, 2015 10:53 AM

[PHP-DEV] Spaceship and NaNs

2015-06-15 Thread Dmitry Stogov
Hi, I found a problem with spaceship operator. It doesn't define result for comparison with NaN. $ sapi/cli/php -r 'var_dump(sqrt(-1) = 0);' int(-1) $ sapi/cli/php -r 'var_dump(0 = sqrt(-1));' int(-1) $ sapi/cli/php -r 'var_dump(0 sqrt(-1));' bool(false) all other comparison operators return

Re: [PHP-DEV] [RFC] Throwable Interface

2015-06-15 Thread Dmitry Stogov
I think REGISTER_INTERFACE() macro in zend_interfaces.h is better. Actually, it's not related to ITERATORs at all. Thanks. Dmitry. On Tue, Jun 16, 2015 at 12:48 AM, Aaron Piotrowski aa...@icicle.io wrote: On Jun 15, 2015, at 9:53 AM, Dmitry Stogov dmi...@zend.com wrote: On Mon, Jun 15

Re: [PHP-DEV] [RFC] Throwable Interface

2015-06-10 Thread Dmitry Stogov
On Tue, Jun 9, 2015 at 9:13 PM, Levi Morrison le...@php.net wrote: On Tue, Jun 9, 2015 at 11:40 AM, Aaron Piotrowski aa...@icicle.io wrote: Does anyone have any questions, comments, or concerns about the Throwable Interface RFC? http://wiki.php.net/rfc/throwable-interface The proposed

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Dmitry Stogov
On Wed, Jun 10, 2015 at 5:42 PM, Sara Golemon poll...@php.net wrote: On Tue, Jun 9, 2015 at 6:05 AM, Matt Wilmas php_li...@realplain.com wrote: Hah, looks like this just changed last week after barely 3 weeks. :-P I didn't verify, just noticed the code change:

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Dmitry Stogov
and also forgot _DEREF suffix in IDENTICAL/NOT_IDENTICAL opcodes. :( Thanks. Dmitry. On Wed, Jun 10, 2015 at 9:45 PM, Matt Wilmas php_li...@realplain.com wrote: Hi Dmitry, - Original Message - From: Dmitry Stogov Sent: Wednesday, June 10, 2015 Hi Sara, https://gist.github.com

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Dmitry Stogov
Hi Sara, https://gist.github.com/dstogov/6a90601872b538d2ddd6 I see no problems committing this (running tests now). Thanks. Dmitry. On Wed, Jun 10, 2015 at 9:02 PM, Dmitry Stogov dmi...@zend.com wrote: On Wed, Jun 10, 2015 at 6:00 PM, Sara Golemon poll...@php.net wrote: On Wed, Jun 10

Re: [PHP-DEV] Undefined variables undefined order

2015-06-10 Thread Dmitry Stogov
On Wed, Jun 10, 2015 at 6:00 PM, Sara Golemon poll...@php.net wrote: On Wed, Jun 10, 2015 at 7:50 AM, Sara Golemon poll...@php.net wrote: On Wed, Jun 10, 2015 at 7:42 AM, Sara Golemon poll...@php.net wrote: Dmitry, what's the reasoning behind this diff in the first place? Doesn't the

Re: [PHP-DEV] Undefined variables undefined order

2015-06-09 Thread Dmitry Stogov
I don't see a big problem changing this for few opcodes in PHP-7 VM, and make behavior more defined. On the other hand I don't think we shouldn't define the order of operand evaluation. This may prevent us performing optimisations in the future. Fixing this in PHP-5.* doesn't cost the effort from

[PHP-DEV] Re: Big hashes problem in master

2015-06-01 Thread Dmitry Stogov
Hi Stas, This should be fixed now. As I understood you already fixed the second problem. Thanks for catching this. Dmitry. On Mon, Jun 1, 2015 at 5:38 AM, Stanislav Malyshev smalys...@gmail.com wrote: Hi! Looking into bug #69295 I've noticed the following problem with hashes on master: if

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: Add targets to simplify building PHP with FDO (Feedback Directed Optimisation) PHP should be built with the folowing steps:: Makefile.global configure.in

2015-05-28 Thread Dmitry Stogov
. Dmitry. On Thu, May 28, 2015 at 5:46 AM, Pierre Joye pierre@gmail.com wrote: On May 26, 2015 11:43 PM, Dmitry Stogov dmi...@zend.com wrote: On Tue, May 26, 2015 at 6:24 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 05/26/2015 07:33 AM, Dmitry Stogov wrote: Commit

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: Add targets to simplify building PHP with FDO (Feedback Directed Optimisation) PHP should be built with the folowing steps:: Makefile.global configure.in

2015-05-28 Thread Dmitry Stogov
On Thu, May 28, 2015 at 1:08 PM, Pierre Joye pierre@gmail.com wrote: On May 28, 2015 1:47 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Pierre, It looks like the training process is not a trivial task. It may speedup one apps and slowdown others. In my experiments training

[PHP-DEV] Re: [PHP-CVS] com php-src: Add targets to simplify building PHP with FDO (Feedback Directed Optimisation) PHP should be built with the folowing steps:: Makefile.global configure.in

2015-05-26 Thread Dmitry Stogov
On Tue, May 26, 2015 at 6:24 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 05/26/2015 07:33 AM, Dmitry Stogov wrote: Commit:7dac4d449f72d7eb029aa1a8ee87aaf38e17e1c5 Author:Dmitry Stogov dmi...@zend.com Tue, 26 May 2015 17:33:25 +0300 Parents

Re: [PHP-DEV] Branching off PHP7 and electing RMs

2015-05-14 Thread Dmitry Stogov
On Wed, May 13, 2015 at 5:32 PM, Pierre Joye pierre@gmail.com wrote: On May 13, 2015 7:57 PM, Julien Pauli jpa...@php.net wrote: Hello people. Time is going, and summer is coming. I think we must have branched 7.0 until end of May, and have our 2 RMs elected. Don't forget

Re: [PHP-DEV] Tweaks to memory_get_usage() and memory_get_peak_usage()

2015-04-27 Thread Dmitry Stogov
Hi Kalle, I don't think we should support all possible use cases introducing new C functions and modifiers. Users already have ability to get all the necessary information, and they may wrap memory_get_udage() as they like. Thanks. Dmitry. On Mon, Apr 27, 2015 at 10:26 AM, Kalle Sommer Nielsen

[PHP-DEV] Re: [PHP-CVS] com php-src: Partial revert of 1a7798c786466977ef8d2bc95b40a435c47c845a that introduced wrong memory access: ext/fileinfo/libmagic/softmagic.c

2015-04-14 Thread Dmitry Stogov
. Even more as we have to upgrade it, this time it was a jump over about 5 releases (and probably we should catch the 5.23 if it’s out propitious with PHP7 timing, as it’ll stay in maybe for the whole first minor). Regards Anatol *From:* Dmitry Stogov [mailto:dmi...@zend.com] *Sent

Re: [PHP-DEV] Concern around growing complexity in engine - hash table specifically

2015-04-09 Thread Dmitry Stogov
On Thu, Apr 9, 2015 at 1:35 PM, Julien Pauli jpa...@php.net wrote: On Wed, Apr 8, 2015 at 10:55 PM, Dmitry Stogov dmi...@zend.com wrote: On Fri, Apr 3, 2015 at 9:57 PM, Anthony Ferrara ircmax...@gmail.com wrote: All, I spent a little bit of time today trying to debug an issue with 7

Re: [PHP-DEV] Concern around growing complexity in engine - hash table specifically

2015-04-08 Thread Dmitry Stogov
On Fri, Apr 3, 2015 at 9:57 PM, Anthony Ferrara ircmax...@gmail.com wrote: All, I spent a little bit of time today trying to debug an issue with 7 that Drupal 8 was facing, specifically regarding an array index not behaving correctly ($array[key] returned null, even though the key existed

[PHP-DEV] Re: [PATCH] Tick functions (on C level) with state

2015-04-07 Thread Dmitry Stogov
Hi Andrey, I didn't get why do you need this extension and how it's going to be used. Thanks. Dmitry. On Tue, Apr 7, 2015 at 4:43 PM, Andrey Hristov p...@hristov.com wrote: Hi, I would like to hear comments about a small change to the low-level tick functionality (main/php_ticks.c) to add

[PHP-DEV] Re: [PATCH] Tick functions (on C level) with state

2015-04-07 Thread Dmitry Stogov
include your ticks extension there. If we accept it, we will accept all together. Thanks. Dmitry. On Tue, Apr 7, 2015 at 5:56 PM, Andrey Hristov p...@hristov.com wrote: Hi Dmitry, On 7.04.2015 16:33, Dmitry Stogov wrote: Hi Andrey, I didn't get why do you need this extension and how it's

Re: [PHP-DEV] [RFC][VOTE] Constructor behaviour of internal classes

2015-04-03 Thread Dmitry Stogov
I don' t see any problems. Thanks. Dmitry. On Fri, Apr 3, 2015 at 6:31 PM, Nikita Popov nikita@gmail.com wrote: On Wed, Apr 1, 2015 at 3:31 AM, Dan Ackroyd dan...@basereality.com wrote: Hi Dmitry, Your approach is definitely a better one, and I have no objection to it whatsoever.

[PHP-DEV] Re: Fix division by zero to throw exception

2015-04-03 Thread Dmitry Stogov
On Fri, Apr 3, 2015 at 11:59 PM, Andrea Faulds a...@ajf.me wrote: Hi, On 3 Apr 2015, at 20:46, Dmitry Stogov dmi...@zend.com wrote: May be you'll also suggest something regarding bitwise shifts with negative offset? Allowing negative offsets using opposite directions would fix

Re: [PHP-DEV] Fix division by zero to throw exception

2015-04-03 Thread Dmitry Stogov
On Fri, Apr 3, 2015 at 10:34 PM, Levi Morrison le...@php.net wrote: 2) Very similar weird behavior was introduced for shift with negative offsets. I also propose to change it in the same way (Fatal error at compile-time, Exception in run-time). Can you describe the weird behavior for

[PHP-DEV] Re: Fix division by zero to throw exception

2015-04-03 Thread Dmitry Stogov
On Fri, Apr 3, 2015 at 10:10 PM, Andrea Faulds a...@ajf.me wrote: Hi Dmitry, On 3 Apr 2015, at 20:04, Dmitry Stogov dmi...@zend.com wrote: 2) Very similar weird behavior was introduced for shift with negative offsets. I also propose to change it in the same way (Fatal error at compile

Re: [PHP-DEV] Fix division by zero to throw exception

2015-04-03 Thread Dmitry Stogov
3) One more problem is modulo :( $ sapi/cli/php -n -r var_dump(1 % 0); Warning: Division by zero in Command line code on line 1 bool(false) Thanks. Dmitry. On Fri, Apr 3, 2015 at 10:50 PM, Dmitry Stogov dmi...@zend.com wrote: On Fri, Apr 3, 2015 at 10:34 PM, Levi Morrison le...@php.net

Re: [PHP-DEV] Fix division by zero to throw exception

2015-04-03 Thread Dmitry Stogov
On Sat, Apr 4, 2015 at 12:04 AM, Andrea Faulds a...@ajf.me wrote: Hi, On 3 Apr 2015, at 21:34, Dmitry Stogov dmi...@zend.com wrote: 3) One more problem is modulo :( $ sapi/cli/php -n -r var_dump(1 % 0); Warning: Division by zero in Command line code on line 1 bool(false) Hmm

[PHP-DEV] Re: Fix division by zero to throw exception

2015-04-03 Thread Dmitry Stogov
On Apr 4, 2015 12:34 AM, Nikita Popov nikita@gmail.com wrote: On Fri, Apr 3, 2015 at 11:13 PM, Dmitry Stogov dmi...@zend.com wrote: On Fri, Apr 3, 2015 at 11:59 PM, Andrea Faulds a...@ajf.me wrote: Hi, On 3 Apr 2015, at 20:46, Dmitry Stogov dmi...@zend.com wrote: May be you'll

[PHP-DEV] Fix division by zero to throw exception

2015-04-03 Thread Dmitry Stogov
1) Division by zero behavior in PHP is really inconsistent. It emits WARNING and returns FALLE. Note, that since PHP-5.6 division by zero may also occur in constant expressions. They are compiled and evaluated only once (on first request) and on next request WARNING is going to be hidden. $ cat

Re: [PHP-DEV] [RFC][VOTE] Constructor behaviour of internal classes

2015-04-01 Thread Dmitry Stogov
On Wed, Apr 1, 2015 at 4:31 AM, Dan Ackroyd dan...@basereality.com wrote: Hi Dmitry, Your approach is definitely a better one, and I have no objection to it whatsoever. Your patch was quite good. You just didn't know what this NULL return required a hack in the PHP core :) Sorry, I was

Re: [PHP-DEV] [RFC][VOTE] Constructor behaviour of internal classes

2015-04-01 Thread Dmitry Stogov
committed into master. Dan, please update the RFC accordingly. Thanks. Dmitry. On Wed, Apr 1, 2015 at 11:14 AM, Dmitry Stogov dmi...@zend.com wrote: On Wed, Apr 1, 2015 at 4:31 AM, Dan Ackroyd dan...@basereality.com wrote: Hi Dmitry, Your approach is definitely a better one, and I have

Re: [PHP-DEV] [RFC][VOTE] Constructor behaviour of internal classes

2015-03-31 Thread Dmitry Stogov
Hi Dan, any update? should I commit it? or do you see any problems? Thanks. Dmitry. On Mon, Mar 30, 2015 at 7:06 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Dan, The updated patch is at https://github.com/php/php-src/pull/1205 The main difference is in ext/intl. If you don't see any

Re: [PHP-DEV] [RFC][VOTE] Constructor behaviour of internal classes

2015-03-31 Thread Dmitry Stogov
PM, Nikita Popov nikita@gmail.com wrote: On Mon, Mar 30, 2015 at 6:06 PM, Dmitry Stogov dmi...@zend.com wrote: Hi Dan, The updated patch is at https://github.com/php/php-src/pull/1205 The main difference is in ext/intl. If you don't see any problems I can commit it. I didn't think

Re: [PHP-DEV] [RFC][VOTE] Constructor behaviour of internal classes

2015-03-30 Thread Dmitry Stogov
: On 26 March 2015 at 20:19, Dmitry Stogov dmi...@zend.com wrote: Hi Dmitry, however the patch looks a bit surprising to me. We have special function to do this - zend_ctor_make_null() and some tricks in the VM. I made just a quick look over your patch but didn't find any references to them

Re: [PHP-DEV] is_callable and function_exists with disable_functions

2015-03-27 Thread Dmitry Stogov
Unfortunately this id not so simple :( If we change class_exists() the following code will stop working ?php if (!class_exists(SomeInternalClass)) { class SomeInternalClass {} } ? On the other hand function_exists() already behaves differently. (so function_exists() and class_exists() are

Re: [PHP-DEV] [RFC][VOTE] Constructor behaviour of internal classes

2015-03-26 Thread Dmitry Stogov
Hi Dan, Your RFC is going to be accepted and I support the idea, however the patch looks a bit surprising to me. Actually, returning NULL from constructors wasn't simple :) We have special function to do this - zend_ctor_make_null() and some tricks in the VM. I made just a quick look over your

[PHP-DEV] Re: Use ropes for string concatenation

2015-03-24 Thread Dmitry Stogov
, Mar 24, 2015 at 12:11 PM, Nikita Popov nikita@gmail.com wrote: On Mon, Mar 23, 2015 at 11:41 PM, Dmitry Stogov dmi...@zend.com wrote: Hi, Recently, Xinchen and me worked on optimization that eliminates useless reallocations and copying during string concatenation (ZEND_ADD_STRING

[PHP-DEV] Re: Use ropes for string concatenation

2015-03-24 Thread Dmitry Stogov
On Tue, Mar 24, 2015 at 2:51 PM, Nikita Popov nikita@gmail.com wrote: On Tue, Mar 24, 2015 at 10:28 AM, Dmitry Stogov dmi...@zend.com wrote: I thought about something like this :) In my opinion UString is really not a proper way to implement Unicoide, but I agree not break anything

[PHP-DEV] Re: Use ropes for string concatenation

2015-03-24 Thread Dmitry Stogov
Popov nikita@gmail.com wrote: On Tue, Mar 24, 2015 at 1:08 PM, Dmitry Stogov dmi...@zend.com wrote: On Tue, Mar 24, 2015 at 2:51 PM, Nikita Popov nikita@gmail.com wrote: On Tue, Mar 24, 2015 at 10:28 AM, Dmitry Stogov dmi...@zend.com wrote: I thought about something like

[PHP-DEV] Use ropes for string concatenation

2015-03-23 Thread Dmitry Stogov
Hi, Recently, Xinchen and me worked on optimization that eliminates useless reallocations and copying during string concatenation (ZEND_ADD_STRING and family + ZEND_CONCAT). The idea comes from ropes, but adopted especially for our needs. Rope is popular data structure in languages with

Re: [PHP-DEV] RE: [PHP-CVS] com php-src: Enable GCC global register variables if available: Zend/Zend.m4 Zend/zend_execute.c

2015-03-18 Thread Dmitry Stogov
, Albert Casademont albertcasadem...@gmail.com wrote: Hi Dmitry, I compiled it with gcc 4.7.2 and the bench.php performed well. Where did you find the errors? Albert On Wed, Mar 18, 2015 at 12:22 AM, Dmitry Stogov dmi...@zend.com wrote: Please also tell your GCC version. We had problems

Re: [PHP-DEV] RE: [PHP-CVS] com php-src: Enable GCC global register variables if available: Zend/Zend.m4 Zend/zend_execute.c

2015-03-18 Thread Dmitry Stogov
in [1]: [1] https://gist.github.com/caioso/9360bd95e829c4172446 Do you need any other information? Thank you very much! Caio From: Dmitry Stogov [mailto:dmi...@zend.com] Sent: terça-feira, 17 de março de 2015 20:22 To: Caio Souza Oliveira Cc: Albert Casademont Filella

Re: [PHP-DEV] RE: [PHP-CVS] com php-src: Enable GCC global register variables if available: Zend/Zend.m4 Zend/zend_execute.c

2015-03-17 Thread Dmitry Stogov
On Tue, Mar 17, 2015 at 10:39 PM, Stanislav Malyshev smalys...@gmail.com wrote: Hi! Dmitry, the perf boost of this is awesome, but is it completely safe? Won't a signal potentially overwrite a register variable here? Like on a timeout, for example? The docs say

Re: [PHP-DEV] RE: [PHP-CVS] com php-src: Enable GCC global register variables if available: Zend/Zend.m4 Zend/zend_execute.c

2015-03-17 Thread Dmitry Stogov
We use preserved CPU registers. According to ABI called functions have to keep them unchanged. Of course they may save and then restore them back. I didn't see any problems yet, however I know that some old GCC may generate invalid code when using global registers. Most probably we will have to

Re: [PHP-DEV] RE: [PHP-CVS] com php-src: Enable GCC global register variables if available: Zend/Zend.m4 Zend/zend_execute.c

2015-03-17 Thread Dmitry Stogov
-src/commit/fb4b7069842491eb66272587422a1f61d41eb869 [2] https://github.com/php/php-src/pull/1181 -- From: Albert Casademont Filella [mailto:albertcasadem...@gmail.com] Sent: terça-feira, 17 de março de 2015 13:23 To: Gustavo Frederico Temple Pedrosa Cc: Dmitry Stogov; Ard Biesheuvel

[PHP-DEV] Fwd: [PHP-CVS] com php-src: Enable GCC global register variables if available: Zend/Zend.m4 Zend/zend_execute.c

2015-03-17 Thread Dmitry Stogov
Stogov dmi...@php.net Date: Tue, Mar 17, 2015 at 1:51 PM Subject: [PHP-CVS] com php-src: Enable GCC global register variables if available: Zend/Zend.m4 Zend/zend_execute.c To: php-...@lists.php.net Commit:fb4b7069842491eb66272587422a1f61d41eb869 Author:Dmitry Stogov dmi...@zend.com Tue

Re: [PHP-DEV] RE: [PHP-CVS] com php-src: Enable GCC global register variables if available: Zend/Zend.m4 Zend/zend_execute.c

2015-03-17 Thread Dmitry Stogov
Please also tell your GCC version. We had problems with 4.6.3 and 4.7.0, so we disabled global variables for GCC prior 4.8.0. Thanks. Dmitry. On Wed, Mar 18, 2015 at 12:36 AM, Dmitry Stogov dmi...@zend.com wrote: Hi Caio, Could you please run make test with and without the patch and compare

Re: [PHP-DEV] [RFC] Basic Scalar Types

2015-03-16 Thread Dmitry Stogov
On Fri, Mar 13, 2015 at 9:33 PM, Stelian Mocanita steli...@php.net wrote: So to get it clear for everyone: the right way is for internals to ignore community as a whole, stick to their own views and implement something nobody actually wants Few people already told - they like this. Thanks.

Re: [PHP-DEV] Drop Multiply VM kind support

2015-03-14 Thread Dmitry Stogov
In general, it's possible to implement necessary function for GOTO executor as well. It's just not trivial. Thanks. Dmitry. On Mar 14, 2015 3:06 PM, Xinchen Hui larue...@php.net wrote: Hey: On Sat, Mar 14, 2015 at 8:01 PM, Bob Weinand bobw...@hotmail.com wrote: Am 13.03.2015 um 05:01

[PHP-DEV] Re: Drop Multiply VM kind support

2015-03-13 Thread Dmitry Stogov
Hi Xinchen, I don't like to remove anything. I think GOTO may be made faster. It's just not very interesting to invest into it, because CALL is more suitable. execute_data-opline-handler(execute_data); won't work with CALL and global CPU registers s well :( Thanks. Dmitry. On Fri, Mar 13,

Re: [PHP-DEV] [RFC] Basic Scalar Types

2015-03-11 Thread Dmitry Stogov
On Thu, Mar 12, 2015 at 12:28 AM, Bob Weinand bobw...@hotmail.com wrote: Hi all, after all, some people are not happy with the current proposals about scalar types. So, they both still possibly may fail. Thus, I'd like to come up with a fallback proposal in case both proposals fail:

[PHP-DEV] Safe execution timeout handling

2015-03-11 Thread Dmitry Stogov
Hi, Unsafe max_execution_time and Out of Memory handling is a huge problem, that often lead to crashes and SHM corruption. The PoC solves the first problem. https://github.com/php/php-src/pull/1173 Instead of throwing zend_error() from signal handler, now we just set EG(vm_interrupt) and

Re: [PHP-DEV][RFC][VOTING] Context Sensitive Lexer

2015-03-11 Thread Dmitry Stogov
On Wed, Mar 11, 2015 at 5:49 PM, Nikita Popov nikita@gmail.com wrote: On Mon, Mar 9, 2015 at 6:47 AM, Marcio Almada marcio.w...@gmail.com wrote: Hi, Just passing by to announce I already have a working version of the new patch: https://github.com/php/php-src/pull/1158 The patch

Re: [PHP-DEV] Safe execution timeout handling

2015-03-11 Thread Dmitry Stogov
On Thu, Mar 12, 2015 at 1:23 AM, Stanislav Malyshev smalys...@gmail.com wrote: Hi! Instead of throwing zend_error() from signal handler, now we just set EG(vm_interrupt) and EG(timed_out) flags. PHP VM checks EG(vm_interrupt) flag on each JMPx instruction (potential loop iteration) and

Re: [PHP-DEV] Safe execution timeout handling

2015-03-11 Thread Dmitry Stogov
On Thu, Mar 12, 2015 at 1:46 AM, Stanislav Malyshev smalys...@gmail.com wrote: Hi! I think, after max_execution_time is exceeded, we may start another hard_timeout, and in case the EG(vm_interrupt) wasn't handled safely, kill the process. I remember such proposal floating on the list

Re: [PHP-DEV] [RFC] Basic Scalar Types

2015-03-11 Thread Dmitry Stogov
On Thu, Mar 12, 2015 at 1:53 AM, Nikita Popov nikita@gmail.com wrote: On Wed, Mar 11, 2015 at 10:28 PM, Bob Weinand bobw...@hotmail.com wrote: Hi all, after all, some people are not happy with the current proposals about scalar types. So, they both still possibly may fail. Thus,

[PHP-DEV] Re: [VOTE] Exceptions in the engine

2015-03-09 Thread Dmitry Stogov
On Mar 8, 2015 9:26 PM, Nikita Popov nikita@gmail.com wrote: On Mon, Feb 23, 2015 at 7:15 PM, Nikita Popov nikita@gmail.com wrote: Hi internals! Voting on the engine exceptions RFC, which proposes to convert existing fatal and recoverable fatal errors into exceptions, has opened:

Re: [PHP-DEV] About optimization for compiler

2015-03-09 Thread Dmitry Stogov
On Mar 9, 2015 1:24 PM, Derick Rethans der...@php.net wrote: On Fri, 27 Feb 2015, Xinchen Hui wrote: Hey Internals: I was looking Bob's switch optimization.. then I start to worry about where is the place optimization should goes.. in generally, PHP is a

Re: [PHP-DEV] About optimization for compiler

2015-03-09 Thread Dmitry Stogov
On Mon, Mar 9, 2015 at 3:52 PM, Bob Weinand bobw...@hotmail.com wrote: Am 09.03.2015 um 11:24 schrieb Derick Rethans der...@php.net: On Fri, 27 Feb 2015, Xinchen Hui wrote: Hey Internals: I was looking Bob's switch optimization.. then I start to worry about where is

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-04 Thread Dmitry Stogov
, but the slower compilation. It is a bit different to the thing we think of as JIT ... new names are good if old names don't fit ... :) Thanks. Dmitry. Cheers Joe On Wed, Mar 4, 2015 at 8:03 AM, Xinchen Hui larue...@php.net wrote: On Wed, Mar 4, 2015 at 3:44 PM, Dmitry Stogov dmi...@zend.com

Re: [PHP-DEV] Design by Contract

2015-03-04 Thread Dmitry Stogov
On Tue, Mar 3, 2015 at 10:04 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Dmitry, On Mon, Mar 2, 2015 at 4:20 PM, Dmitry Stogov dmi...@zend.com wrote: It may be to late for 7.0. I feel the same way. It may be better to try add it with 7.x. Also Alexander liked to to add another

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Dmitry Stogov
On Tue, Mar 3, 2015 at 6:44 PM, Anthony Ferrara ircmax...@gmail.com wrote: Zeev, On Tue, Mar 3, 2015 at 8:05 AM, Zeev Suraski z...@zend.com wrote: So I do apologize to the person. I don't to the code. I wanted to verify whether my gut was correct (minimal amount of output, and stdout

Re: [PHP-DEV] Re: Zend JIT Open Sourced

2015-03-03 Thread Dmitry Stogov
On Tue, Mar 3, 2015 at 6:57 PM, Zeev Suraski z...@zend.com wrote: -Original Message- From: Anthony Ferrara [mailto:ircmax...@gmail.com] Sent: Tuesday, March 03, 2015 5:44 PM To: Zeev Suraski Cc: PHP Internals Subject: Re: [PHP-DEV] Re: Zend JIT Open Sourced Zeev, On

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