Re: [PHP-DEV] [RFC][Discussion] Add session_gc()

2016-04-07 Thread Yasuo Ohgaki
Hi Andrey, On Fri, Apr 8, 2016 at 12:46 PM, Yasuo Ohgaki wrote: >> >> The signature for SessionHandlerInterface::gc() accepts a TTL value as a >> parameter; session_gc() can too: >> >> function session_gc($ttl = ini_get('session.gc_maxlifetime')) {} >> >> * Note: The

Re: [PHP-DEV] [RFC][Discussion] Add session_create_id()

2016-04-07 Thread Yasuo Ohgaki
Hi Stas, On Fri, Apr 8, 2016 at 1:59 AM, Stanislav Malyshev wrote: >> Session ID can be non HEX strings. session_create_id() makes custom >> session ID creation easier. >> https://wiki.php.net/rfc/session-create-id >> >> Please note that the implementation was in the

Re: [PHP-DEV] [RFC][Discussion] Add session_gc()

2016-04-07 Thread Yasuo Ohgaki
Hi Andrey, On Fri, Apr 8, 2016 at 12:12 AM, Andrey Andreev wrote: > On Thu, Apr 7, 2016 at 9:05 AM, Yasuo Ohgaki wrote: >> >> Hi all, >> >> This is very old RFC that adds session_gc(). >> https://wiki.php.net/rfc/session-gc >> >> It simply adds missing

Re: [PHP-DEV] [RFC][DISCUSSION] Session ID without hashing

2016-04-07 Thread Yasuo Ohgaki
Hi Stas, On Fri, Apr 8, 2016 at 8:36 AM, Stanislav Malyshev wrote: >> Session module does not require hashing to generate session ID. This >> RFC removes hashing from session module and enable use_strict_mode as >> an insurance for broken RNG. >> >>

Re: [PHP-DEV] [RFC][Discussion] Add session_gc()

2016-04-07 Thread Stanislav Malyshev
Hi! > This is very old RFC that adds session_gc(). > https://wiki.php.net/rfc/session-gc > > It simply adds missing session_gc() function. > Comments are appreciated. No objections except for "Document calling session_gc() periodically is the best practice" - it should be made clear that it is

Re: [PHP-DEV] [RFC][DISCUSSION] Session ID without hashing

2016-04-07 Thread Stanislav Malyshev
Hi! > Session module does not require hashing to generate session ID. This > RFC removes hashing from session module and enable use_strict_mode as > an insurance for broken RNG. > > https://wiki.php.net/rfc/session-id-without-hashing I'm not sure why that should be the default. First of all,

[PHP-DEV] Re: Forbid binding methods to incompatible $this

2016-04-07 Thread Nikita Popov
On Wed, Mar 30, 2016 at 7:21 AM, Nikita Popov wrote: > Hi internals! > > Currently, inside instance methods the following invariant holds: > > assert(is_null($this) || is_object($this)) > > This is a problem. I'd like to guarantee the following invariant instead: > >

Re: [PHP-DEV] [RFC] Square bracket syntax for array destructuring assignment

2016-04-07 Thread Björn Larsson
Den 2016-04-07 kl. 21:11, skrev Markus Fischer: Hey, On 07.04.2016 14:21, Andrea Faulds wrote: Bob and I have made an RFC which proposes an alternative syntax for list(): https://wiki.php.net/rfc/short_list_syntax Please tell us your thoughts. Reading the last sample in the RFC: Both

Re: [PHP-DEV] Access and Visibility Modifiers

2016-04-07 Thread Fleshgrinder
On 4/7/2016 8:43 PM, Fleshgrinder wrote: > On 4/7/2016 8:05 PM, Rowan Collins wrote: >> Meanwhile, it might be worth checking the list archives for previous >> discussions of package visibility; I know it has come up a couple of >> times recently, in various forms, so it would be good not to

Re: [PHP-DEV] [RFC] Square bracket syntax for array destructuring assignment

2016-04-07 Thread Markus Fischer
Hey, On 07.04.2016 14:21, Andrea Faulds wrote: > Bob and I have made an RFC which proposes an alternative syntax for list(): > > https://wiki.php.net/rfc/short_list_syntax > > Please tell us your thoughts. Reading the last sample in the RFC: > Both due to implementation issues, and for

Re: [PHP-DEV] Access and Visibility Modifiers

2016-04-07 Thread Fleshgrinder
On 4/7/2016 8:43 PM, Fleshgrinder wrote: > In other words: same as Java without any modifier. I only changed the > proposal because var is to be kept and the current semantic of it > (implicit public) but not being truly equal motivated me to change the > proposal and to give it a new meaning. >

Re: [PHP-DEV] [RFC][DISCUSSION] Session ID without hashing

2016-04-07 Thread Markus Fischer
On 06.04.2016 07:47, Yasuo Ohgaki wrote: > Session module does not require hashing to generate session ID. This > RFC removes hashing from session module and enable use_strict_mode as > an insurance for broken RNG. > > https://wiki.php.net/rfc/session-id-without-hashing I cannot talk about the

Re: [PHP-DEV] Access and Visibility Modifiers

2016-04-07 Thread Fleshgrinder
On 4/7/2016 8:32 PM, guilhermebla...@gmail.com wrote: > Hi, > > I was working on a private-class support for PHP an year ago, until I hit a > problem I couldn't fix myself. > Hi, I know and I commented on the PR on GitHub some time ago. I kept the semantics of private classes exactly as you have

Re: [PHP-DEV] Access and Visibility Modifiers

2016-04-07 Thread Fleshgrinder
On 4/7/2016 8:05 PM, Rowan Collins wrote: > Fleshgrinder wrote on 07/04/2016 18:35: >> I would like to change above definition for properties since the*var* >> deprecation was voted negative: >> >> # Properties >> private := limited to the current class >> protected := limited to the current and

Re: [PHP-DEV] Typed properties patch

2016-04-07 Thread Fleshgrinder
On 4/7/2016 8:21 PM, Dmitry Stogov wrote: > Today, PHP works with arguments in this way. > If we decide to enable nullable "?" syntax and/or "union types" we will > have to use them for properties as well. > but for now, we don't have anything accepted yet, and we are going to > push both RFC on

Re: [PHP-DEV] Access and Visibility Modifiers

2016-04-07 Thread guilhermebla...@gmail.com
Hi, I was working on a private-class support for PHP an year ago, until I hit a problem I couldn't fix myself. Now I have some more expertise of what I could do to resolve it, but I still didn't start on rebase/update of patch yet. However, I'd like to describe my line of thinking here, so people

Re: [PHP-DEV] Typed properties patch

2016-04-07 Thread Dmitry Stogov
On 04/07/2016 08:55 PM, Fleshgrinder wrote: On 4/7/2016 3:55 PM, Dmitry Stogov wrote: On 04/07/2016 03:44 PM, Bob Weinand wrote: Am 6.4.2016 um 10:45 schrieb Dmitry Stogov >: 1) While parameters allow null to be accepted as the default value, null is

Re: [PHP-DEV] Access and Visibility Modifiers

2016-04-07 Thread Rowan Collins
Fleshgrinder wrote on 07/04/2016 18:35: I would like to change above definition for properties since the*var* deprecation was voted negative: # Properties private := limited to the current class protected := limited to the current and child classes var := limited to the current assembly

Re: [PHP-DEV] Typed properties patch

2016-04-07 Thread Fleshgrinder
On 4/7/2016 3:55 PM, Dmitry Stogov wrote: > On 04/07/2016 03:44 PM, Bob Weinand wrote: >>> Am 6.4.2016 um 10:45 schrieb Dmitry Stogov >> >: >>> 1) While parameters allow null to be accepted as the default value, >>> null is never a valid value for a typed

Re: [PHP-DEV] IntlCharsetDetector

2016-04-07 Thread Andrea Faulds
Derick Rethans wrote: As you say, it doesn't work properly. As a matter of fact, guessing charsets, like timezones, is not possible. You need to know which charset something is in. If not, you need to address *that* problem. Indeed, 畂桳栠摩琠敨映捡獴! -- Andrea Faulds https://ajf.me/ P.S. Google it.

Re: [PHP-DEV] [RFC] Square bracket syntax for array destructuring assignment

2016-04-07 Thread Fleshgrinder
+1 love it :) -- Richard "Fleshgrinder" Fussenegger signature.asc Description: OpenPGP digital signature

Re: [PHP-DEV] Access and Visibility Modifiers

2016-04-07 Thread Fleshgrinder
On 3/19/2016 12:51 PM, Fleshgrinder wrote: > I just thought about this some more and this is actually not true. > > namespace Fleshgrinder\Examples\PhpInternals; > > final class A { > int $x; > var $y; > $z; > > function getX() { > return

Re: [PHP-DEV] Final properties

2016-04-07 Thread Fleshgrinder
/Sending this again because the mail server was down./ +1 from my side too for this proposal. Retrofitting immutability with additional keywords is not the nicest thing but PHP has no other way (same was true for Java when they added it). Using the *final* keyword while subclasses are able to

Re: [PHP-DEV] [RFC][Discussion] Add session_create_id()

2016-04-07 Thread Stanislav Malyshev
Hi! > Session ID can be non HEX strings. session_create_id() makes custom > session ID creation easier. > https://wiki.php.net/rfc/session-create-id > > Please note that the implementation was in the session.c years ago. > The patch enables and add test for it. I like the idea, but I would add

Re: [PHP-DEV] IntlCharsetDetector

2016-04-07 Thread Bishop Bettini
On Wed, Apr 6, 2016 at 9:18 AM, Sebastian Bergmann wrote: > Am 05.04.2016 um 11:05 schrieb Derick Rethans: > > I would advice against adding this. > > > > As you say, it doesn't work properly. As a matter of fact, guessing > > charsets, like timezones, is not possible. You

Re: [PHP-DEV] [RFC] Square bracket syntax for array destructuring assignment

2016-04-07 Thread Bishop Bettini
On Thu, Apr 7, 2016 at 8:21 AM, Andrea Faulds wrote: > Hi everyone, > > Bob and I have made an RFC which proposes an alternative syntax for list(): > > https://wiki.php.net/rfc/short_list_syntax > > Please tell us your thoughts. > Thanks for your (plural) work on this RFC. You

Re: [PHP-DEV] [RFC][Discussion] Add session_gc()

2016-04-07 Thread Andrey Andreev
Hi, On Thu, Apr 7, 2016 at 9:05 AM, Yasuo Ohgaki wrote: > Hi all, > > This is very old RFC that adds session_gc(). > https://wiki.php.net/rfc/session-gc > > It simply adds missing session_gc() function. > Comments are appreciated. > > There are a few question marks raised by

Re: [PHP-DEV] [RFC] Square bracket syntax for array destructuring assignment

2016-04-07 Thread Paul Jones
> On Apr 7, 2016, at 07:21, Andrea Faulds wrote: > > Hi everyone, > > Bob and I have made an RFC which proposes an alternative syntax for list(): > > https://wiki.php.net/rfc/short_list_syntax > > Please tell us your thoughts. Reading the name of the RFC led me to imagine what

Re: [PHP-DEV] IntlCharsetDetector

2016-04-07 Thread Sebastian Bergmann
Am 05.04.2016 um 11:05 schrieb Derick Rethans: > I would advice against adding this. > > As you say, it doesn't work properly. As a matter of fact, guessing > charsets, like timezones, is not possible. You need to know which > charset something is in. If not, you need to address *that* problem.

Re: [PHP-DEV] Final properties

2016-04-07 Thread Marco Pivetta
On 5 April 2016 at 18:28, Chris Riley wrote: > > I started a discussion on this a while back, but it fizzled due to not > having an elegant solution for the 'give me a new one of these with these > values changed' problem. I would HIGHLY suggest not using the final > keyword.

Re: [PHP-DEV] Typed properties patch

2016-04-07 Thread Dmitry Stogov
On 04/07/2016 03:44 PM, Bob Weinand wrote: Hey, Am 6.4.2016 um 10:45 schrieb Dmitry Stogov >: Hi Jow, First of all, I appreciate the amount of effort you already invested into this idea. Anyway, I still don't agree with the following terms of

Re: [PHP-DEV] [RFC] Square bracket syntax for array destructuring assignment

2016-04-07 Thread Rowan Collins
Lester Caine wrote on 07/04/2016 13:37: DO WE HAVE TO PUT UP WITH THIS STUPIDITY? Top posting 2 characters AND including all the sig Hi Lester, If you want to remind people of the mailing list rules, the link you are looking for is

Re: [PHP-DEV] Re: Typed properties patch

2016-04-07 Thread Lester Caine
On 06/04/16 10:19, Joe Watkins wrote: > > 1) nullable properties > > I agree that we need a way to that, but I would rather see it > covered by nullable types rfc. > > > 2) concerns about default values > > Implicit defaults would only allow us to reduce read checks, it > can't

Re: [PHP-DEV] Final properties

2016-04-07 Thread Chris Riley
On 5 April 2016 at 11:57, Michał Brzuchalski wrote: > Hi, > > 2016-04-05 12:13 GMT+02:00 Marco Pivetta : > > > Hi, > > > > On 5 April 2016 at 12:06, Michał Brzuchalski > > wrote: > > > >> Hi Marco, > >> > >> Ad. 1 it is

[PHP-DEV] [RFC][DISCUSSION] Session ID without hashing

2016-04-07 Thread Yasuo Ohgaki
Hi all, Session module does not require hashing to generate session ID. This RFC removes hashing from session module and enable use_strict_mode as an insurance for broken RNG. https://wiki.php.net/rfc/session-id-without-hashing Comments are appreciated! Regards, -- Yasuo Ohgaki

[PHP-DEV] [RFC][Discussion] Add session_gc()

2016-04-07 Thread Yasuo Ohgaki
Hi all, This is very old RFC that adds session_gc(). https://wiki.php.net/rfc/session-gc It simply adds missing session_gc() function. Comments are appreciated. Regards, -- Yasuo Ohgaki yohg...@ohgaki.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

[PHP-DEV] Re: Object getter method optimization

2016-04-07 Thread Lin Yo-An
Yeah I know. I've saw that yesterday.

[PHP-DEV] Re: Typed properties patch

2016-04-07 Thread Joe Watkins
Morning Dmitry, Thanks for your time reviewing the patch, appreciated. > 1) nullable properties I agree that we need a way to that, but I would rather see it covered by nullable types rfc. > 2) concerns about default values Implicit defaults would only allow us to reduce

Re: [PHP-DEV] Final properties

2016-04-07 Thread Michał Brzuchalski
Hi Robert, Marco and Chris, now I see your point. Lastly I've found in DZone newsletter about Java putting `var` and `val` keywords, interesting is the second which is going to be used in case of immutable "variables" like a "values" (that's where `val` came from) see here

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-04-07 Thread Phil Sturgeon
On Sat, Apr 2, 2016 at 3:10 PM, Björn Larsson wrote: > Good evening,Den 2016-03-31 kl. 10:34, skrev Joe Watkins: >> >> Morning, >> >>> Given that public is implied for all properties above there >>> is a value in having the same rule for type. >> >> public $bar, int

Re: [PHP-DEV] Typed properties patch

2016-04-07 Thread Bob Weinand
Hey, > Am 6.4.2016 um 10:45 schrieb Dmitry Stogov : > > Hi Jow, > > First of all, I appreciate the amount of effort you already invested into > this idea. > Anyway, I still don't agree with the following terms of RFC and corresponding > implementation: > > 1) While

Re: [PHP-DEV] [RFC] Square bracket syntax for array destructuring assignment

2016-04-07 Thread Marco Pivetta
Yes, Lester :-P Also, +1 to the RFC. On Apr 7, 2016 14:37, "Lester Caine" wrote: > DO WE HAVE TO PUT UP WITH THIS STUPIDITY? > Top posting 2 characters AND including all the sig > > On 07/04/16 13:29, Midori Kocak wrote: > > +1 > > > >> On 07 Apr 2016, at 14:21, Andrea

Re: [PHP-DEV] [RFC] Square bracket syntax for array destructuring assignment

2016-04-07 Thread Lester Caine
DO WE HAVE TO PUT UP WITH THIS STUPIDITY? Top posting 2 characters AND including all the sig On 07/04/16 13:29, Midori Kocak wrote: > +1 > >> On 07 Apr 2016, at 14:21, Andrea Faulds wrote: >> >> Hi everyone, >> >> Bob and I have made an RFC which proposes an alternative

[PHP-DEV] Malformed ChangeLog

2016-04-07 Thread Yasuo Ohgaki
Hi Stas, It seems ChangeLog is not updated correctly http://php.net/ChangeLog-5.php#5.5.34 ODBC: <- This should be "Phar" Fixed bug #71860 (Invalid memory write in phar on filename with \0 in name). The patch is merge to 5.6 and 7.0 branch, but it is not mentioned in 5.6.20 ChangeLog (7.0.5

Re: [PHP-DEV] [RFC] Square bracket syntax for array destructuring assignment

2016-04-07 Thread Midori Kocak
+1 > On 07 Apr 2016, at 14:21, Andrea Faulds wrote: > > Hi everyone, > > Bob and I have made an RFC which proposes an alternative syntax for list(): > > https://wiki.php.net/rfc/short_list_syntax > > Please tell us your thoughts. > > Thanks! > -- > Andrea Faulds >

[PHP-DEV] [RFC] Square bracket syntax for array destructuring assignment

2016-04-07 Thread Andrea Faulds
Hi everyone, Bob and I have made an RFC which proposes an alternative syntax for list(): https://wiki.php.net/rfc/short_list_syntax Please tell us your thoughts. Thanks! -- Andrea Faulds https://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

[PHP-DEV] test

2016-04-07 Thread Ferenc Kovacs
sorry for the noise -- Ferenc Kovács @Tyr43l - http://tyrael.hu

[PHP-DEV] Re: Typed properties patch

2016-04-07 Thread Dmitry Stogov
Hi Jow, First of all, I appreciate the amount of effort you already invested into this idea. Anyway, I still don't agree with the following terms of RFC and corresponding implementation: 1) While parameters allow null to be accepted as the default value, null is never a valid value for a

[PHP-DEV] [RFC][Discussion] Add session_create_id()

2016-04-07 Thread Yasuo Ohgaki
Hi all Session ID can be non HEX strings. session_create_id() makes custom session ID creation easier. https://wiki.php.net/rfc/session-create-id Please note that the implementation was in the session.c years ago. The patch enables and add test for it. Comments are appreciated! -- Yasuo Ohgaki

[PHP-DEV] Re: Object getter method optimization

2016-04-07 Thread Dmitry Stogov
did you see my patch? It already uses run_time_cache of calling op_array to get getter property offset. It's also possible to "allocate" slots in "run_time_cache" of caller op_array at compile_time, increasing op_array->cache_size. (see zend_compile.c), but I don't see a big reason to do it.