Re: [PHP-DEV] taint as a first-class feature for php 7.1

2015-11-17 Thread Lester Caine
On 17/11/15 07:34, Christopher Owen wrote: > - Including taint as a first class feature will allow for it to be available > in future linux distribution packages of php Any decent linux distribution already makes 'optional' extensions easy to switch on or off. What you are actually proposing by m

Re: [PHP-DEV] Immutable modifier

2015-11-17 Thread Alexander Lisachenko
Hello, internals! We discussed this topic early, see this thread: http://www.serverphorums.com/read.php?7,1123371,1124223 for any additional thoughts and ideas. I want to attach a link to the Java draft of partial immutability of objects: http://cr.openjdk.java.net/~jrose/values/values-0.html, it'

[PHP-DEV] DateTime / Timezone funny behaviour, between different version

2015-11-17 Thread Martin Keckeis
Hello together, i just noticed that the date + timezone switching changed a lot last time? tl;dr https://3v4l.org/pSplY When taking a old datetime: $date = \DateTime::createFromFormat('d.m.Y H:i:s', '01.01.1900 00:00:00', new \DateTimeZone('Europe/Berlin')); and switching between the given time

[PHP-DEV] Re: DateTime / Timezone funny behaviour, between different version

2015-11-17 Thread Martin Keckeis
Hello, 2015-11-17 11:40 GMT+01:00 Martin Keckeis : > Hello together, > > i just noticed that the date + timezone switching changed a lot last time? > > tl;dr https://3v4l.org/pSplY > > When taking a old datetime: > $date = \DateTime::createFromFormat('d.m.Y H:i:s', '01.01.1900 00:00:00', > new \D

Re: [PHP-DEV] Immutable modifier

2015-11-17 Thread Rowan Collins
Hi Andrea, Andrea Faulds wrote on 17/11/2015 01:47: Larry Garfield wrote: The "everything in the constructor" is the problem. That results in, essentially, an obscenely long function call that just happens to be named __construct(). If I wanted something that obscure and hard to work with I'd

Re: [PHP-DEV] Immutable modifier

2015-11-17 Thread Chris Riley
On 17 November 2015 at 11:04, Rowan Collins wrote: > Hi Andrea, > > Andrea Faulds wrote on 17/11/2015 01:47: > >> Larry Garfield wrote: >> >>> The "everything in the constructor" is the problem. That results in, >>> essentially, an obscenely long function call that just happens to be >>> named _

Re: [PHP-DEV] DateTime / Timezone funny behaviour, between different version

2015-11-17 Thread Derick Rethans
On Tue, 17 Nov 2015, Martin Keckeis wrote: > Hello together, > > i just noticed that the date + timezone switching changed a lot last time? > > tl;dr https://3v4l.org/pSplY > > When taking a old datetime: > $date = \DateTime::createFromFormat('d.m.Y H:i:s', '01.01.1900 00:00:00', > new \DateTim

Re: [PHP-DEV] DateTime / Timezone funny behaviour, between different version

2015-11-17 Thread Martin Keckeis
Hello, 2015-11-17 12:23 GMT+01:00 Derick Rethans : > On Tue, 17 Nov 2015, Martin Keckeis wrote: > > > Hello together, > > > > i just noticed that the date + timezone switching changed a lot last > time? > > > > tl;dr https://3v4l.org/pSplY > > > > When taking a old datetime: > > $date = \DateTime

Re: [PHP-DEV] Immutable modifier

2015-11-17 Thread Lester Caine
On 17/11/15 11:04, Rowan Collins wrote: > If you look at the PSR-7 implementation I linked to earlier [1], there's > no such boilerplate, just a single call to "clone $this", and PHP does > it all for you. But that doesn't work with a simplistic definition of > immutable like "mutable in constructo

Re: [PHP-DEV] Immutable modifier

2015-11-17 Thread Mathieu Rochette
On 17/11/2015 13:26, Lester Caine wrote: On 17/11/15 11:04, Rowan Collins wrote: If you look at the PSR-7 implementation I linked to earlier [1], there's no such boilerplate, just a single call to "clone $this", and PHP does it all for you. But that doesn't work with a simplistic definition of

Re: [PHP-DEV] Immutable modifier

2015-11-17 Thread Andrea Faulds
Hi, Rowan Collins wrote: Hi Andrea, Andrea Faulds wrote on 17/11/2015 01:47: Larry Garfield wrote: The "everything in the constructor" is the problem. That results in, essentially, an obscenely long function call that just happens to be named __construct(). If I wanted something that obscur

Re: [PHP-DEV] Immutable modifier

2015-11-17 Thread Rowan Collins
Mathieu Rochette wrote on 17/11/2015 13:40: Indeed, maybe there is a use for a new language construct to help reduce the boilerplate, but it could be done afterward, the "everything in the constructor" works fine. If there is too much in the construct it might be a sign that the class is doing

Re: [PHP-DEV] Immutable modifier

2015-11-17 Thread Rowan Collins
Andrea Faulds wrote on 17/11/2015 15:37: Does it? You can write a five-line constructor which does what you need: private function __construct(array $properties) { foreach ($properties as $name => $value) { $this->{$name} = $value; } } You can do changes like

Re: [PHP-DEV] Immutable modifier

2015-11-17 Thread Marc Bennewitz
FYI there was a very small discussion about it ~ 1 year ago https://www.mail-archive.com/internals@lists.php.net/msg71521.html On 11/16/2015 10:15 AM, Chris Riley wrote: Hi, There has been a lot of interest recently (eg psr-7) in immutable data. I'm considering putting an RFC together to add la

[PHP-DEV] Benchmark Results for PHP Master 2015-11-17

2015-11-17 Thread lp_benchmark_robot
Results for project PHP master, build date 2015-11-17 05:25:48+02:00 commit: e4173bd15c0860a2d9f6a6b0c4844e939b98d523 revision date: 2015-11-16 16:23:39+01:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB mem

Re: [PHP-DEV] Immutable modifier

2015-11-17 Thread Lester Caine
On 17/11/15 20:38, Marc Bennewitz wrote: > FYI there was a very small discussion about it ~ 1 year ago > https://www.mail-archive.com/internals@lists.php.net/msg71521.html And https://www.mail-archive.com/internals%40lists.php.net/msg61320.html covered making properties read_only ... -- Lester C