Re: [PHP-DEV] [RFC] [Discuss] Random Functions Throwing Exceptions in PHP 7.0.0

2015-08-23 Thread Scott Arciszewski
On Sun, Aug 23, 2015 at 10:30 PM, Thomas Bley wrote: > > > > Nikita Nefedov wrote on 23.08.2015 18:27: > > > > > > >> On 23 Aug 2015, at 18:37, Thomas Bley wrote: > >> > >> > >> consider this code: > >> > >> declare(strict_types=0); > >> ini_set('display_errors', '1'); > >> > >> function get_rand

Re: [PHP-DEV] [RFC] [Discuss] Random Functions Throwing Exceptions in PHP 7.0.0

2015-08-23 Thread Thomas Bley
Nikita Nefedov wrote on 23.08.2015 18:27: > > >> On 23 Aug 2015, at 18:37, Thomas Bley wrote: >> >> >> consider this code: >> >> declare(strict_types=0); >> ini_set('display_errors', '1'); >> >> function get_random_int(): int { >> return false; >> } >> echo get_random_int(); >> >> and th

Re: [PHP-DEV] Re: com php-src: Remove assumption that extensions are in ext/ext-name Fixesalso a weird ln (symlink) hack for phpdbg: acinclude.m4 build/config-stubsbuild/genif.sh build/order_by_dep.aw

2015-08-23 Thread Stanislav Malyshev
Hi! > That makes me think about what we discussed a while back. > > At least for stable/RC, do force to use PR and tracis check before commit. Sometimes PR is an overkill, especially for smaller fixes. But checking with CI, especially when we're talking about substantial changes, should be alway

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

2015-08-23 Thread Rowan Collins
On 22/08/2015 02:38, Sherif Ramadan wrote: I see. So you're not actually doing overflow checks then? Because at the point you'd be checking this zend_long or size_t it could have already overflowed or wrapped. The subject may have misled me to understand differently. I think I understand the co

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

2015-08-23 Thread Jakub Zelenka
Hi Anatol, On Fri, Aug 21, 2015 at 9:41 AM, Anatol Belski wrote: > Hi, > > Resending this as missed internals at the start. > > I was lately rethinking some part of the 64-bit RFC, and also seeing now > Jakub's work on catching overflows in ext/openssl and Matt Williams > suggestions on it (whic

Re: [PHP-DEV] [RFC] [Discuss] Random Functions Throwing Exceptions in PHP 7.0.0

2015-08-23 Thread Niklas Keller
> > I guess people continue to use rand() or mt_rand() if they skip the > documentation. > Even frameworks which are advertised with 100% php7 compatibility use > mt_rand(). > There's nothing wrong with mt_rand() in non-security contexts, it's still there in PHP 7. If anyone is using mt_rand() in

Re: [PHP-DEV] [RFC] [Discuss] Random Functions Throwing Exceptions in PHP 7.0.0

2015-08-23 Thread Thomas Bley
Larry Garfield wrote on 23.08.2015 18:19: > On 08/22/2015 07:33 PM, Thomas Bley wrote: >> Anthony Ferrara wrote on 22.08.2015 21:58: >> >>> All, >>> >>> I am putting a simple RFC up for discussion to make random_* throw >>> exceptions on failure in order to ensure we fail-closed. >>> >>> https:/

Re: [PHP-DEV] [RFC] [Discuss] Random Functions Throwing Exceptions in PHP 7.0.0

2015-08-23 Thread Nikita Nefedov
> On 23 Aug 2015, at 18:37, Thomas Bley wrote: > > > consider this code: > > declare(strict_types=0); > ini_set('display_errors', '1'); > > function get_random_int(): int { > return false; > } > echo get_random_int(); > > and then use strict_types=1 So you're implying that in case of retur

Re: [PHP-DEV] [RFC] [Discuss] Random Functions Throwing Exceptions in PHP 7.0.0

2015-08-23 Thread Larry Garfield
On 08/22/2015 07:33 PM, Thomas Bley wrote: Anthony Ferrara wrote on 22.08.2015 21:58: All, I am putting a simple RFC up for discussion to make random_* throw exceptions on failure in order to ensure we fail-closed. https://wiki.php.net/rfc/random-function-exceptions Considering this topic ha

Re: [PHP-DEV] [RFC] [Discuss] Random Functions Throwing Exceptions in PHP 7.0.0

2015-08-23 Thread Thomas Bley
Niklas Keller wrote on 23.08.2015 16:30: > > >> why not have false + e_warning for strict_types=0 and fatal error for >> strict_types=1 ? >> >> >> Doing function random_int(): int { ... > > > How's this connected to `strict_types`? It's not. > > >> If people use this function without read

Re: [PHP-DEV] libpcre version requirements

2015-08-23 Thread Christoph Becker
Hi Anatol, On 22.08.2015 at 21:21, Anatol Belski wrote: > Hi Christoph, > >> -Original Message- >> From: Christoph Becker [mailto:cmbecke...@gmx.de] >> Sent: Saturday, August 22, 2015 6:55 PM >> To: Anatol Belski ; 'Nikita Popov' >> >> Cc: 'Adam Harvey' ; 'PHP internals' >> >> Subject

Re: [PHP-DEV] [RFC] [Discuss] Random Functions Throwing Exceptions in PHP 7.0.0

2015-08-23 Thread Niklas Keller
> > why not have false + e_warning for strict_types=0 and fatal error for > strict_types=1 ? > Doing function random_int(): int { ... How's this connected to `strict_types`? It's not. If people use this function without reading documentation, they will also > use other things without documentati

Re: [PHP-DEV] [RFC] [Discuss] Random Functions Throwing Exceptions in PHP 7.0.0

2015-08-23 Thread Thomas Bley
Scott Arciszewski wrote on 23.08.2015 02:50: > On Sat, Aug 22, 2015 at 8:33 PM, Thomas Bley wrote: >> Anthony Ferrara wrote on 22.08.2015 21:58: >> >>> All, >>> >>> I am putting a simple RFC up for discussion to make random_* throw >>> exceptions on failure in order to ensure we fail-closed. >>

Re: [PHP-DEV] Re: com php-src: Remove assumption that extensions are in ext/ext-name Fixesalso a weird ln (symlink) hack for phpdbg: acinclude.m4 build/config-stubsbuild/genif.sh build/order_by_dep.aw

2015-08-23 Thread Pierre Joye
Hi, On Aug 23, 2015 12:24 PM, "Stanislav Malyshev" wrote: > > Hi! > > > Same problem on Travis, e.g. > > . > > > > Could you please have a look at this issue? > > If the problem shows on Travis, how come it got committed to master? I > would like t