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

2015-05-14 Thread Stanislav Malyshev
Hi! > We put together a roadmap for 7.0 with Kalle: > https://wiki.php.net/todo/php70 > Then the idea was brought up that we should consider other candidates other > than him, and we got sidetracked but did not really decide anything. > I agree that it would be nice sorting it out ASAP, but having

Re: [PHP-DEV] Adding "numeric" type hint

2015-05-14 Thread David Muir
> On 14 May 2015, at 9:27 pm, Yasuo Ohgaki wrote: > > Hi Arvids, > > On Mon, May 11, 2015 at 8:01 PM, Arvids Godjuks > wrote: > >> Hello, I have read through your blog post, and I agreed on the issue >> earlier, nut I have a question that bugs me for a while: what DoS issue are >> you talking

Re: [PHP-DEV] is_digits() and digits type

2015-05-14 Thread Walter Parker
For recordID parameters, I think the only to get what you want is use a class and strongly type the objects. I deal daily with code that assumes things that look like integers are integers. As far as integers go, 123456 and 000123456 are the same. As record keys, they don't have to be the same (it

Re: [PHP-DEV] is_digits() and digits type

2015-05-14 Thread Yasuo Ohgaki
Hi Walter, On Fri, May 15, 2015 at 2:49 AM, Walter Parker wrote: > Adding a numeric pseudo type will not fix abuse, it will only change the > abuse. I don't think it is worth the effort. I also think it might a > slippery slope to lots of other pseudo types and other half ideas that will > add c

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

2015-05-14 Thread Pavel KouĊ™il
On Wed, May 13, 2015 at 9:38 AM, Sebastian Bergmann wrote: > Am 13.05.2015 um 08:30 schrieb Pierre Joye: >> Why don't you do it? You have access and you are a very good writer. >> No big C knowledge required either in this case :) > > There was/is consensus on what I proposed back in February: >

Re: [PHP-DEV] is_digits() and digits type

2015-05-14 Thread Walter Parker
In C, the int data type is defined as being at least 16 bits in size. Long is defined as being at least 32 bits and long long is defined as being at least 64 bits in size. The standard further recommends that the size of int be the most natural and efficient for the processor (i.e. 16 on 16 bit pro

Re: [PHP-DEV] Alternative PHP tags and strict_types=1

2015-05-14 Thread Albert Casademont
mmm I guess this is the correct behaviour, <% tags ar now not parsed at all and behave as plain text. If you run http://3v4l.org/uDDW3 foo wrote: > Hi! > > In php7@20150501, I've noticed that this code > produces the expected output [1]: > > <% echo 'top'; %> > > But th

[PHP-DEV] Alternative PHP tags and strict_types=1

2015-05-14 Thread Bishop Bettini
Hi! In php7@20150501, I've noticed that this code produces the expected output [1]: <% echo 'top'; %> http://3v4l.org/RriFV> unexpectedly produces the strict-must-be-first instruction error: <% echo 'top'; %> https://wiki.php.net/rfc/remove_alternative_php_tags> from the

Re: [PHP-DEV] Re: Adding "numeric" type hint

2015-05-14 Thread Yasuo Ohgaki
Hi Arvids, On Mon, May 11, 2015 at 8:01 PM, Arvids Godjuks wrote: > Hello, I have read through your blog post, and I agreed on the issue > earlier, nut I have a question that bugs me for a while: what DoS issue are > you talking about? I tried to imagine any scenario that can lead to a DoS > wui

Re: [PHP-DEV] PHP7 scalar type hint error bug?

2015-05-14 Thread Yasuo Ohgaki
Hi Nikita, On Thu, May 14, 2015 at 6:51 PM, Nikita Popov wrote: > The output is a bit confusing: This will actually throw a TypeException, > it's just currently rendered like a fatal error (known issue, will have to > be resolved at some point). If you wrap your code with a catch > (TypeExceptio

Re: [PHP-DEV] is_digits() and digits type

2015-05-14 Thread Yasuo Ohgaki
Hi Rowan, On Thu, May 14, 2015 at 6:19 PM, Rowan Collins wrote: > Yasuo Ohgaki wrote on 14/05/2015 06:19: > >> I guess DbC will not prevent users from abusing type hints, though. >> > > They'll only "abuse" them in exactly the same way they currently "abuse" > existing checks and casts. > > e.g.

Re: [PHP-DEV] PHP7 scalar type hint error bug?

2015-05-14 Thread Nikita Popov
On Thu, May 14, 2015 at 11:46 AM, Yasuo Ohgaki wrote: > Hi Anthony, > > I'm experimenting type hints to write how it could be useful. > > http://3v4l.org/nhI61 > > I thought too large value error in weak mode is E_RECOVERABLE_ERROR, > but it's not. The RFC ( https://wiki.php.net/rfc/scalar_type_h

[PHP-DEV] PHP7 scalar type hint error bug?

2015-05-14 Thread Yasuo Ohgaki
Hi Anthony, I'm experimenting type hints to write how it could be useful. http://3v4l.org/nhI61 I thought too large value error in weak mode is E_RECOVERABLE_ERROR, but it's not. The RFC ( https://wiki.php.net/rfc/scalar_type_hints_v5 ) does not state how it behaves for too large values. E_ERRO

Re: [PHP-DEV] is_digits() and digits type

2015-05-14 Thread Rowan Collins
Yasuo Ohgaki wrote on 14/05/2015 06:19: I guess DbC will not prevent users from abusing type hints, though. They'll only "abuse" them in exactly the same way they currently "abuse" existing checks and casts. e.g. $id = intval($_GET['id']); looks perfectly reasonable to most people, but if y

Re: [PHP-DEV] mt_rand() behavior change is not in UPGRADING

2015-05-14 Thread Yasuo Ohgaki
Hi Nikita, On Thu, May 14, 2015 at 5:55 PM, Nikita Popov wrote: > This change is not mt_rand specific, it applies to all internal functions. > See https://wiki.php.net/rfc/zpp_fail_on_overflow. You are right that it > is not mentioned in UPGRADING yet. > Thanks, I completely forgot about it eve

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

2015-05-14 Thread Lester Caine
On 14/05/15 06:19, Pierre Joye wrote: > Why you and Anatol makes perfect sense. Kalle can help a lot with the > numerous tasks that will pop up, testing patches cherry picks and all > these time consuming tasks. I'd second that, as long as all three of you are happy to provide the time? I would t

Re: [PHP-DEV] mt_rand() behavior change is not in UPGRADING

2015-05-14 Thread Nikita Popov
On Thu, May 14, 2015 at 10:13 AM, Yasuo Ohgaki wrote: > Hi all, > > It's nice to see mt_rand() behavior is improved. > > [yohgaki@dev ~]$ php-5.6 -r "var_dump(mt_rand(222, > '999'));" > int(115282844144104926) > [yohgaki@dev ~]$ php-7.0 -r "var_dump(mt_rand(222, > '999

[PHP-DEV] mt_rand() behavior change is not in UPGRADING

2015-05-14 Thread Yasuo Ohgaki
Hi all, It's nice to see mt_rand() behavior is improved. [yohgaki@dev ~]$ php-5.6 -r "var_dump(mt_rand(222, '999'));" int(115282844144104926) [yohgaki@dev ~]$ php-7.0 -r "var_dump(mt_rand(222, '999'));" Warning: mt_rand() expects parameter 2 to be integer,

Re: [PHP-DEV] is_digits() and digits type

2015-05-14 Thread Yasuo Ohgaki
Hi Walter, On Tue, May 12, 2015 at 11:25 AM, Walter Parker wrote: > You know, given how worried you seem to be about this issue, could you > booby trap your so that if the developers use the wrong type (int vs. > string) the program throws fatal errors with nasty error messages that > explain ho