Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Walter Parker
On Wed, Apr 29, 2015 at 11:40 PM, Arvids Godjuks arvids.godj...@gmail.com wrote: Stop trying to fix clever idiots from shooting themselves in the foot. The standard result from these actions is to make life a pain for regular or better programmers while only adding mild speed bumps to those

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Walter Parker
On Wed, Apr 29, 2015 at 11:54 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Arvids, On Thu, Apr 30, 2015 at 3:40 PM, Arvids Godjuks arvids.godj...@gmail.com wrote: Stop trying to fix clever idiots from shooting themselves in the foot. The standard result from these actions is to make life

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Walter Parker
On Wed, Apr 29, 2015 at 11:47 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Walter, On Thu, Apr 30, 2015 at 3:12 PM, Walter Parker walt...@gmail.com wrote: And that is relevant how? How many Android phone run PHP applications? Search web for IoT devices that can run PHP. Regards, --

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Yasuo Ohgaki
Hi Arvids, On Thu, Apr 30, 2015 at 3:40 PM, Arvids Godjuks arvids.godj...@gmail.com wrote: Stop trying to fix clever idiots from shooting themselves in the foot. The standard result from these actions is to make life a pain for regular or better programmers while only adding mild speed bumps

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Walter Parker
On Thu, Apr 30, 2015 at 12:06 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Walter, On Thu, Apr 30, 2015 at 3:54 PM, Walter Parker walt...@gmail.com wrote: You didn't answer the question: why should we care? Is there enough of user base now to care? IOT might be able to run PHP, but how

RE: [PHP-DEV] Reserve even more type hints RFC

2015-04-30 Thread Florian Margaine
Hi, Le 30 avr. 2015 11:04, François Laupretre franc...@php.net a écrit : De : Christoph Becker [mailto:cmbecke...@gmx.de] Relying on documentation only seems to be insufficient to me. Consider a developer not reading the documentation and facing the issue that his/her code might break

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Yasuo Ohgaki
Hi Stas, On Thu, Apr 30, 2015 at 2:42 PM, Stanislav Malyshev smalys...@gmail.com wrote: int Cast is bad. Incorrect int type hint worse as it could trigger DoS. I do not see any potential for DoS here. Trying to assign security implications so it looks like disagreeing with you jeopardizes

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Yasuo Ohgaki
Hi Walter, On Thu, Apr 30, 2015 at 3:12 PM, Walter Parker walt...@gmail.com wrote: And that is relevant how? How many Android phone run PHP applications? Search web for IoT devices that can run PHP. Regards, -- Yasuo Ohgaki yohg...@ohgaki.net

RE: [PHP-DEV] Reserve even more type hints RFC

2015-04-30 Thread François Laupretre
De : Christoph Becker [mailto:cmbecke...@gmx.de] Relying on documentation only seems to be insufficient to me. Consider a developer not reading the documentation and facing the issue that his/her code might break with PHP 7.1 (i.e. a minor version). +1. I already asked if we should enforce

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Yasuo Ohgaki
Hi Walter, On Thu, Apr 30, 2015 at 3:54 PM, Walter Parker walt...@gmail.com wrote: You didn't answer the question: why should we care? Is there enough of user base now to care? IOT might be able to run PHP, but how many actually do? And of the ones that do, is automatically half fixing the

[PHP-DEV] Re: Reserve even more type hints RFC

2015-04-30 Thread Nikita Popov
On Thu, Apr 30, 2015 at 12:41 AM, Christoph Becker cmbecke...@gmx.de wrote: Hi everybody! I've noticed that the Reserve Even More Types in PHP 7 RFC[1] has been moved to Process and Policy with the comment needs no impl. However, the RFC states: | This RFC does not fully reserve them as

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Arvids Godjuks
Stop trying to fix clever idiots from shooting themselves in the foot. The standard result from these actions is to make life a pain for regular or better programmers while only adding mild speed bumps to those clever idiots. Things like a numeric type will only encourage the clever idiots

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Stanislav Malyshev
Hi! Unfortunately, not all users does this and new PHP type hint opens new hole that security researchers and attackers are interested in. I am sorry, but you still brought no proof at all that there are any security implications. Without such proof, these claims are baseless, so I intend to

Re: [PHP-DEV] Reserve even more type hints RFC

2015-04-30 Thread Maciek Sokolewicz
On 30-4-2015 11:03, François Laupretre wrote: De : Christoph Becker [mailto:cmbecke...@gmx.de] Relying on documentation only seems to be insufficient to me. Consider a developer not reading the documentation and facing the issue that his/her code might break with PHP 7.1 (i.e. a minor

RE: [PHP-DEV] Reserve even more type hints RFC

2015-04-30 Thread François Laupretre
De : Florian Margaine [mailto:flor...@margaine.com] Should we throw fatal errors for functions starting with 2 underscores too? Well, you're right. Functions and methods, even if more people now know that these names are reserved. Regards François -- PHP Internals - PHP Runtime

[PHP-DEV] Re: Reserve even more type hints RFC

2015-04-30 Thread Christoph Becker
Nikita Popov wrote: On Thu, Apr 30, 2015 at 12:41 AM, Christoph Becker cmbecke...@gmx.de wrote: I've noticed that the Reserve Even More Types in PHP 7 RFC[1] has been moved to Process and Policy with the comment needs no impl. I've moved the RFC based on Sara's mail in the voting thread

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Lester Caine
On 30/04/15 08:42, Walter Parker wrote: I thing using string type hints are are easier to advocate (and I think they are the correct type if you need to be 32/64 indepentent). Otherwise, a numeric type doesn't fix the problem. It hides it. It is a short term that doesn't scale properly. Use

Re: [PHP-DEV] 7.0 Release Management

2015-04-30 Thread Anatol Belski
Hi Julien, On Wed, April 29, 2015 17:50, Julien Pauli wrote: On Wed, Apr 29, 2015 at 3:57 PM, Anatol Belski anatol@belski.net wrote: On Wed, April 29, 2015 15:35, Ferenc Kovacs wrote: On Wed, Apr 29, 2015 at 3:21 PM, Anatol Belski anatol@belski.net wrote: Hi, On Sun,

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

2015-04-30 Thread Marc Bennewitz
Am 30.04.2015 um 14:30 schrieb Julien Pauli: On Thu, Apr 30, 2015 at 6:51 AM, Sebastian Bergmann sebast...@php.net wrote: Am 30.04.2015 um 02:50 schrieb Stanislav Malyshev: I like the idea, however we do have the deadline and the deadline has been passed. So I wonder if we can't keep it for

Re: [PHP-DEV] Reserve even more type hints RFC

2015-04-30 Thread Rowan Collins
Florian Margaine wrote on 30/04/2015 10:23: We don't need a warning there, we need a fatal error. These names are *invalid* as class names. Should we throw fatal errors for functions starting with 2 underscores too? Actually, soft reservation has genuine advantages for those: 1) It

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

2015-04-30 Thread Julien Pauli
On Thu, Apr 30, 2015 at 6:51 AM, Sebastian Bergmann sebast...@php.net wrote: Am 30.04.2015 um 02:50 schrieb Stanislav Malyshev: I like the idea, however we do have the deadline and the deadline has been passed. So I wonder if we can't keep it for 7.1 That means introducing a change in

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

2015-04-30 Thread Sebastian Bergmann
Am 30.04.2015 um 14:30 schrieb Julien Pauli: We could make an exception (sic !) and add the Throwable interface to PHP7, even after feature freeze, because it is an easy pick and having a clear Exception model for 7.0 is to my opinion very important. +1, couldn't agree more. -- PHP

Re: [PHP-DEV] [RFC][VOTE] Improved Error Callback Mechanism

2015-04-30 Thread Patrick ALLAERT
Le jeu. 30 avr. 2015 à 01:32, Stanislav Malyshev smalys...@gmail.com a écrit : Hi! The issue targeted here is two extensions overriding php_error_cb can't live side by side and that issue exists since PHP 4.0. Should a bug report be opened? I'm not sure why can't they live side by

Re: [PHP-DEV] [RFC][VOTE] Improved Error Callback Mechanism

2015-04-30 Thread Patrick ALLAERT
Le jeu. 30 avr. 2015 à 02:26, Stanislav Malyshev smalys...@gmail.com a écrit : Hi! You can cast your vote on the Wiki [1] and the according patch is available as a Pull Request [2]. Vote will be open for two weeks, counting from today. I think the idea of this RFC is nice but it

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Dennis Birkholz
Hi Yasuo, Am 30.04.2015 um 07:26 schrieb Yasuo Ohgaki: int Cast is bad. Incorrect int type hint worse as it could trigger DoS. could you please stop arguing with Denial of Service for this behavior? Using a security related term that has nothing to do with the actual problem is irritating.

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Levi Morrison
This numeric type is a type of int or float. There is a formal name for such types: union types. Some languages have syntax for union types that would look like this: int | float. I have a draft RFC for this subject: https://wiki.php.net/rfc/union_types. Union types would be useful for other

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

2015-04-30 Thread Stanislav Malyshev
Hi! We could make an exception (sic !) and add the Throwable interface to PHP7, even after feature freeze, because it is an easy pick and having a clear Exception model for 7.0 is to my opinion very important. I'm OK with it but I fear this is opening a can of worms, since people will start

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Walter Parker
On Thu, Apr 30, 2015 at 7:35 AM, Levi Morrison le...@php.net wrote: This numeric type is a type of int or float. There is a formal name for such types: union types. Some languages have syntax for union types that would look like this: int | float. I have a draft RFC for this subject:

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

2015-04-30 Thread Marcio Almada
Hi Stas, 2015-04-30 13:51 GMT-03:00 Stanislav Malyshev smalys...@gmail.com: Hi! We could make an exception (sic !) and add the Throwable interface to PHP7, even after feature freeze, because it is an easy pick and having a clear Exception model for 7.0 is to my opinion very important.

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

2015-04-30 Thread Pierre Joye
On May 1, 2015 1:24 AM, Marcio Almada marcio.w...@gmail.com wrote: Hi Stas, 2015-04-30 13:51 GMT-03:00 Stanislav Malyshev smalys...@gmail.com: Hi! We could make an exception (sic !) and add the Throwable interface to PHP7, even after feature freeze, because it is an easy pick and

Re: [PHP-DEV] Remove old PHP6 forward compatibility

2015-04-30 Thread Sara Golemon
On Wed, Apr 29, 2015 at 4:12 PM, Stanislav Malyshev smalys...@gmail.com wrote: Back when PHP6 was actually a thing, we added the 'b' string literal prefix and the (binary) cast to be forward compatible with PHP6, however since the entire unicode strings part were dropped, these are no longer

Re: [PHP-DEV] Add support $object::class

2015-04-30 Thread Sara Golemon
On Mon, Apr 27, 2015 at 10:28 AM, S.A.N ua.san.a...@gmail.com wrote: Why not? 1. get_class($object) - looks bad and long It's a function call. A pretty much self-declarative one at that. What is bad about it? For that matter, what's long about it? It's pretty short as PHP function calls go.

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Walter Parker
On Wed, Apr 29, 2015 at 10:42 PM, Stanislav Malyshev smalys...@gmail.com wrote: Hi! int Cast is bad. Incorrect int type hint worse as it could trigger DoS. I do not see any potential for DoS here. Trying to assign security implications so it looks like disagreeing with you jeopardizes

Re: [PHP-DEV] Adding numeric type hint

2015-04-30 Thread Walter Parker
On Wed, Apr 29, 2015 at 10:50 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Ryan, On Thu, Apr 30, 2015 at 1:29 PM, Ryan Pallas derokor...@gmail.com wrote: On Wed, Apr 29, 2015 at 8:37 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Rowan, On Thu, Apr 30, 2015 at 11:17 AM, Yasuo Ohgaki