[PHP-DEV] Trivial 7.2 opcache segfault

2018-01-17 Thread David Zuelke
I'm trying to understand this one: https://bugs.php.net/bug.php?id=75837 Is that related to the optimizations in 7.2 around unused local variables? Can that somehow be triggered by the @ operator? It's such a trivial reproduce case, it seems almost silly that this hasn't come up during testing...

Re: [PHP-DEV] [RFC] [DISCUSSION] Improve null-coalescing operator (??) adding empty check (??:)

2018-01-17 Thread Lito
On 17/01/18 19:43, Andrey Andreev wrote: Hi, On Wed, Jan 17, 2018 at 8:28 PM, Lito wrote: No $foo ?: 'default' , it's only equivalent to (isset($foo) && $foo) ? $foo : 'default' if $foo exists. Also PHP has added ?? as null-coalescing operator that works with undefined

Re: [PHP-DEV] [RFC] [DISCUSSION] Improve null-coalescing operator (??) adding empty check (??:)

2018-01-17 Thread Andrey Andreev
Hi, On Wed, Jan 17, 2018 at 8:28 PM, Lito wrote: > No $foo ?: 'default' , it's only equivalent to (isset($foo) && $foo) ? $foo > : 'default' if $foo exists. > > Also PHP has added ?? as null-coalescing operator that works with undefined > variables/attributes/keys, my proposal

Re: [PHP-DEV] [RFC] [DISCUSSION] Improve null-coalescing operator (??) adding empty check (??:)

2018-01-17 Thread Nikita Popov
On Wed, Jan 17, 2018 at 7:28 PM, Lito wrote: > No $foo ?: 'default' , it's only equivalent to (isset($foo) && $foo) ? > $foo : 'default' if $foo exists. > > Also PHP has added ?? as null-coalescing operator that works with > undefined variables/attributes/keys, my proposal is an

Re: [PHP-DEV] [RFC] [DISCUSSION] Improve null-coalescing operator (??) adding empty check (??:)

2018-01-17 Thread Lito
No $foo ?: 'default' , it's only equivalent to (isset($foo) && $foo) ? $foo : 'default' if $foo exists. Also PHP has added ?? as null-coalescing operator that works with undefined variables/attributes/keys, my proposal is an improvement over this one. I don't want to endorse usage of

Re: [PHP-DEV] [RFC] [DISCUSSION] Improve null-coalescing operator (??) adding empty check (??:)

2018-01-17 Thread Marco Pivetta
This: echo (isset($foo) && $foo) ? $foo : 'default'; Is equivalent to: echo $foo ?: 'default'; Please don't endorse usage of undefined variables. On 17 Jan 2018 19:00, "Lito" wrote: > Related with Request #75833 https://bugs.php.net/bug.php?id=75833 > > From PHP 7

Re: [PHP-DEV] unit test a single case

2018-01-17 Thread Christoph M. Becker
On 17.01.2018 at 17:50, Nikita Popov wrote: > On Wed, Jan 17, 2018 at 5:40 PM, Sam Ding wrote: > >> Further how to debug a php unit case code? > > The first step for debugging would be to look at the .out or .diff file for > the failing .phpt. There will also be a .php

[PHP-DEV] [RFC] [DISCUSSION] Improve null-coalescing operator (??) adding empty check (??:)

2018-01-17 Thread Lito
Related with Request #75833 https://bugs.php.net/bug.php?id=75833 From PHP 7 null-coalescing operator is a great option to avoid a previous exists check with isset. But I think that this comaparison can be improved adding a ternary operator like ??: and check also empty values. Example:

Re: [PHP-DEV] unit test a single case

2018-01-17 Thread Pedro Magalhães
On Wed, Jan 17, 2018 at 4:50 PM, Nikita Popov wrote: > On Wed, Jan 17, 2018 at 5:40 PM, Sam Ding wrote: > > > > > Hi PHP developers, > > > > I am new and try to porting php v7.2.1 on IBM s390x, after building and > > run unit test "make test", there

Re: [PHP-DEV] unit test a single case

2018-01-17 Thread Nikita Popov
On Wed, Jan 17, 2018 at 5:40 PM, Sam Ding wrote: > > Hi PHP developers, > > I am new and try to porting php v7.2.1 on IBM s390x, after building and > run unit test "make test", there are > some failed cases. Is there any way I can run a single case and get the > result? >

[PHP-DEV] unit test a single case

2018-01-17 Thread Sam Ding
Hi PHP developers, I am new and try to porting php v7.2.1 on IBM s390x, after building and run unit test "make test", there are some failed cases. Is there any way I can run a single case and get the result? Further how to debug a php unit case code? Thanks, Sam Ding, Linux on z Systems Open

[PHP-DEV] request to add

2018-01-17 Thread Sam Ding
Sam Ding, Linux on z Systems Open Source Ecosystem IBM Toronto Lab, email: samd...@ca.ibm.com phone: (905)413-2947