[PHP-DEV] Static class property can be accessed as $object::$property?

2016-02-26 Thread kelerest123
Hi, I'd be very thankful for a clear explanation on this: http://stackoverflow.com/questions/35656898 May be it's just a word game and I don't understand it correctly, but documentation states one, though $object::$staticProperty works in all versions (tested on 3v4l). Very best

Re: [PHP-DEV] [RFC] Callable constructors

2016-02-26 Thread Dan Ackroyd
On 25 February 2016 at 22:43, Adam Harvey wrote: > Why is having a special syntax that is considered callable and > conflates instantiation and method calls better than having the injector > accept a class name > and use reflection as required to instantiate that? > They're >

[PHP-DEV] Re: Request for Karma

2016-02-26 Thread Dominic Grostate
Username is: orolyn On 26 Feb 2016 3:31 p.m., "Dominic Grostate" wrote: > Hello, > > I would like to request karma for the wiki. > I'm assisting Rasmus Schultz with the Generics RFC. > > Thank you, > Dominic >

[PHP-DEV] Request for Karma

2016-02-26 Thread Dominic Grostate
Hello, I would like to request karma for the wiki. I'm assisting Rasmus Schultz with the Generics RFC. Thank you, Dominic

[PHP-DEV] NEUTRAL Benchmark Results for PHP Master 2016-02-26

2016-02-26 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-02-26 06:31:42+02:00 commit: b378c7c previous commit:a1c9bd8 revision date: 2016-02-25 16:07:38+08: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] [RFC] Callable constructors

2016-02-26 Thread Johannes Schlüter
On Fri, 2016-02-26 at 11:30 +, Andrea Faulds wrote: > This is true for a trivial implementation like the one above, but I > would point out that a more sophisticated userland implementation could > fix this by generating PHP code. You don't have to generate PHP code for this to work:

Re: [PHP-DEV] Re: [RFC] Callable constructors

2016-02-26 Thread Nikita Nefedov
On Fri, 26 Feb 2016 14:28:19 +0300, Andrea Faulds wrote: Hi Rowan, Rowan Collins wrote: On 25/02/2016 17:40, Andrea Faulds wrote: Snipped for brevity, but I agree with your sentiment here. Making __construct more magic seems like an imperfect solution to this. I'm not sure

Re: [PHP-DEV] [RFC] Callable constructors

2016-02-26 Thread Andrea Faulds
Hi Dan, Dan Ackroyd wrote: On 25 February 2016 at 18:16, Adam Harvey wrote: am I right that this is equivalent to the following? $injector->delegate('FooInterface', function (...$args) { return new FooImplementation(...$args); }); Nope. The vital part you missed is

Re: [PHP-DEV] Re: [RFC] Callable constructors

2016-02-26 Thread Andrea Faulds
Hi Rowan, Rowan Collins wrote: On 25/02/2016 17:40, Andrea Faulds wrote: Snipped for brevity, but I agree with your sentiment here. Making __construct more magic seems like an imperfect solution to this. I'm not sure making a new magic method (new, __new, etc) is much better though, since it

Re: [PHP-DEV] Re: [RFC] Callable constructors

2016-02-26 Thread Andrea Faulds
Hi Adam, Adam Harvey wrote: On 25 February 2016 at 09:40, Andrea Faulds wrote: Instead of changing __construct to implicitly create the object it acts on in certain contexts, I would suggest a simpler approach: add a magic ::new() static method that exists on all classes (think

Re: [PHP-DEV] [RFC] Callable constructors

2016-02-26 Thread Rowan Collins
On 25/02/2016 22:11, Dan Ackroyd wrote: It's been possible to do that in PDO for years, and people have been using it, and liking it, even if they weren't aware that 'under the hood' the PDO extension was doing the equivalent of calling 'new' as a callable. Actually, PDO_FETCH_CLASS does

Re: [PHP-DEV] [RFC Proposal] var keyword deprecation/removal

2016-02-26 Thread Tony Marston
Sent: Thursday, February 25, 2016 12:58 PM To: Tony Marston Subject: Re: [PHP-DEV] [RFC Proposal] var keyword deprecation/removal Hi Tony, Thank you so much for your feedback. You make some really good, valid points. If I may provide some responses to some of them: Where is your proof?

Re: [PHP-DEV] [RFC Proposal] var keyword deprecation/removal

2016-02-26 Thread Tony Marston
wrote in message news:56cf439f.2040...@fleshgrinder.com... On 2/25/2016 10:26 AM, Tony Marston wrote: Science shows that it is harmful, let's clean it up! Your "proof" is not scientific, it is just personal opinion. There is no evidence that use of the "var" keyword is harmful in any way.