Re: [PHP-DEV] Allow empty property names

2016-03-25 Thread Yasuo Ohgaki
On Sat, Mar 26, 2016 at 8:08 AM, Yasuo Ohgaki wrote: > On Sat, Mar 26, 2016 at 8:00 AM, Marco Pivetta wrote: >> On 25 March 2016 at 23:56, Yasuo Ohgaki wrote: >>> >>> Hi all, >>> >>> On Sat, Mar 26, 2016 at 5:31 AM, Marco Pivetta

Re: [PHP-DEV] Allow empty property names

2016-03-25 Thread Marco Pivetta
Hi Yasuo, On 26 March 2016 at 00:08, Yasuo Ohgaki wrote: > > Not suggesting allowing "\0" for property names: the example just shows > > creating a public, private and protected property with an empty name. > > Could you show some real world example use cases? > I've been

Re: [PHP-DEV] Allow empty property names

2016-03-25 Thread Yasuo Ohgaki
Hi Marco, On Sat, Mar 26, 2016 at 8:00 AM, Marco Pivetta wrote: > On 25 March 2016 at 23:56, Yasuo Ohgaki wrote: >> >> Hi all, >> >> On Sat, Mar 26, 2016 at 5:31 AM, Marco Pivetta wrote: >> > var_dump((object) ['' => 'foo']); >> >

Re: [PHP-DEV] Allow empty property names

2016-03-25 Thread Marco Pivetta
Hi Yasuo, On 25 March 2016 at 23:56, Yasuo Ohgaki wrote: > Hi all, > > On Sat, Mar 26, 2016 at 5:31 AM, Marco Pivetta wrote: > > var_dump((object) ['' => 'foo']); > > var_dump((object) ["\0*\0" => 'foo']); > > var_dump((object) ["\0Foo\0" => 'foo']); > >

Re: [PHP-DEV] Allow empty property names

2016-03-25 Thread Yasuo Ohgaki
Hi all, On Sat, Mar 26, 2016 at 5:31 AM, Marco Pivetta wrote: > var_dump((object) ['' => 'foo']); > var_dump((object) ["\0*\0" => 'foo']); > var_dump((object) ["\0Foo\0" => 'foo']); Allowing null char would be too much. We reject null char in path parameters, it should be

Re: [PHP-DEV] Allow empty property names

2016-03-25 Thread Marco Pivetta
On 25 March 2016 at 21:19, Scott Arciszewski wrote: > On Fri, Mar 25, 2016 at 1:45 PM, Nikita Popov > wrote: > > > Hi internals, > > > > Currently we do not allow (*) creating empty property names on objects, > > i.e. > > > > $obj->{''} = 42; > > >

Re: [PHP-DEV] Allow empty property names

2016-03-25 Thread Scott Arciszewski
On Fri, Mar 25, 2016 at 1:45 PM, Nikita Popov wrote: > Hi internals, > > Currently we do not allow (*) creating empty property names on objects, > i.e. > > $obj->{''} = 42; > > is illegal. While empty property names are unlikely to be useful per se, > they are

Re: [PHP-DEV] Why is 0x7F permitted in PHP identifiers?

2016-03-25 Thread Ryan Pallas
On Fri, Mar 25, 2016 at 1:25 PM, Scott Arciszewski wrote: > On Fri, Mar 25, 2016 at 10:20 AM, Andrea Faulds wrote: > > > Hi everyone, > > > > Identifiers in PHP source code (including variables names with $) conform > > to the regex

Re: [PHP-DEV] Why is 0x7F permitted in PHP identifiers?

2016-03-25 Thread Scott Arciszewski
On Fri, Mar 25, 2016 at 10:20 AM, Andrea Faulds wrote: > Hi everyone, > > Identifiers in PHP source code (including variables names with $) conform > to the regex /[_a-zA-Z\x7F-\xFF][_0-9a-zA-Z\x7F-\xFF]*/. Most of this regex > is pretty standard: it allows alphanumeric ASCII

[PHP-DEV] Allow empty property names

2016-03-25 Thread Nikita Popov
Hi internals, Currently we do not allow (*) creating empty property names on objects, i.e. $obj->{''} = 42; is illegal. While empty property names are unlikely to be useful per se, they are problematic for deserialization of foreign formats like JSON. To avoid this issue {"": null} will

Re: [PHP-DEV] Re: [RFC] [Vote] Short Ternary Assignment Operator

2016-03-25 Thread Sara Golemon
On Fri, Mar 25, 2016 at 6:44 AM, Nikita Popov wrote: > I don't think the current implementation is entirely correct. In particular, > it doesn't look memory-safe to me. You're doing an RW fetch on the LHS > first, then evaluate the RHS expression and then ASSIGN to the

[PHP-DEV] Why is 0x7F permitted in PHP identifiers?

2016-03-25 Thread Andrea Faulds
Hi everyone, Identifiers in PHP source code (including variables names with $) conform to the regex /[_a-zA-Z\x7F-\xFF][_0-9a-zA-Z\x7F-\xFF]*/. Most of this regex is pretty standard: it allows alphanumeric ASCII characters and underscores, plus any character with the 8th bit set (presumably

Re: [PHP-DEV] Re: [RFC] [Vote] Short Ternary Assignment Operator

2016-03-25 Thread Nikita Popov
On Fri, Mar 25, 2016 at 4:25 AM, Sara Golemon wrote: > On Thu, Mar 24, 2016 at 11:12 AM, Sara Golemon wrote: > > After some discussion (and realizing the referenced implementation > > needed more work that a simple replacement of tokens), I've decided > > the

[PHP-DEV] NEUTRAL Benchmark Results for PHP Master 2016-03-25

2016-03-25 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-03-25 06:27:31+02:00 commit: 454ae8a previous commit:bc9910c revision date: 2016-03-24 11:09:08+00:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

Re: [PHP-DEV] Combine ??= and ?:= assignment operator rfc's.

2016-03-25 Thread Midori Kocak
http://www.rubyinside.com/what-rubys-double-pipe-or-equals-really-does-5488.html > On 25 Mar 2016, at 13:42, Nikita Popov wrote: > > On Fri, Mar 25, 2016 at 11:59 AM, Midori Kocak

Re: [PHP-DEV] Combine ??= and ?:= assignment operator rfc's.

2016-03-25 Thread Nikita Popov
On Fri, Mar 25, 2016 at 11:59 AM, Midori Kocak wrote: > Hi Everyone, > > I think it's better idea to combine those two assignment operator RFC’s. > So I am going to close the current one and open ??= with ?:= > What do you think? And we have to find better names. > > Wishes, >

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-25 Thread Dmitry Stogov
I hope this is a joke. Lets try not to reinvent Perl. Thanks. Dmitry. From: Nikita Popov Sent: Thursday, March 24, 2016 20:50 To: PHP internals Subject: [PHP-DEV] Add spaceship assignment operator Hi internals! For consistency, we

Re: [PHP-DEV] [VOTE] Warn about invalid strings in arithmetic

2016-03-25 Thread Andrea Faulds
Hi Björn, Björn Larsson wrote: Den 2016-03-24 kl. 21:29, skrev Andrea Faulds: Came to think on a conversation with Sara G last year about introducing the following operators, namely >==, <== & <==> working exactly like the existing ones but without type juggling. Maybe that would alleviate

Re: [PHP-DEV] Combine ??= and ?:= assignment operator rfc's.

2016-03-25 Thread Dan Ackroyd
On 25 March 2016 at 10:59, Midori Kocak wrote: > I think it's better idea to combine those two assignment operator RFC’s. So I > am going to close the current one and open ??= with ?:= Keeping RFCs separate is good in my opinion. In general it allows the discussions to be

Re: [PHP-DEV] [VOTE] Warn about invalid strings in arithmetic

2016-03-25 Thread Patrick ALLAERT
Le jeu. 24 mars 2016 à 21:29, Andrea Faulds a écrit : > Hi Patrick, > > Patrick ALLAERT wrote: > > Hi Andrea, > > > > Nice work. > > > > I'm globally +0.7 on it, there is however a few things that are unclear > to > > me: > > > > * What happens with an empty string? Warning, notice

Re: [PHP-DEV] [VOTE] var deprecation

2016-03-25 Thread Christoph Becker
On 25.03.2016 at 08:12, Dmitry Stogov wrote: > Java is going to add "var" (http://openjdk.java.net/jeps/286), we are going > to remove... If this JEP is going to pass, "var" will be allowed to replace (local) *type declarations*. In PHP "var" is an alternative *visibility specification*.

[PHP-DEV] Combine ??= and ?:= assignment operator rfc's.

2016-03-25 Thread Midori Kocak
Hi Everyone, I think it's better idea to combine those two assignment operator RFC’s. So I am going to close the current one and open ??= with ?:= What do you think? And we have to find better names. Wishes, Midori Kocak -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

RE: [PHP-DEV] [VOTE] var deprecation

2016-03-25 Thread Thomas Punt
Hi Dmitry, > Java is going to add "var" (http://openjdk.java.net/jeps/286), we are going > to remove... We're not going to remove the "var" keyword, just deprecate its usage in the context of setting properties as public. The "var" keyword will still remain a reserved word, and it can therefore

Re: [PHP-DEV] [VOTE] Warn about invalid strings in arithmetic

2016-03-25 Thread Yasuo Ohgaki
Hi, On Fri, Mar 25, 2016 at 6:25 AM, Björn Larsson wrote: > Came to think on a conversation with Sara G last year about introducing > the following operators, namely >==, <== & <==> working exactly like the > existing ones but without type juggling. >==, <== were not

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-25 Thread Yasuo Ohgaki
Hi all, On Fri, Mar 25, 2016 at 11:25 AM, Pierre Joye wrote: > On Fri, Mar 25, 2016 at 12:50 AM, Nikita Popov wrote: >> Hi internals! >> >> For consistency, we should add a spaceship assignment operator: >> >> $a <=>= $b; >> // same as >>

Re: [PHP-DEV] [VOTE] var deprecation

2016-03-25 Thread Dmitry Stogov
Java is going to add "var" (http://openjdk.java.net/jeps/286), we are going to remove... From: mtko...@gmail.com on behalf of Mutlu Kocak Sent: Thursday, March 24, 2016 22:15 To: Colin O'Dell Cc: PHP Internals