Re: [PHP-DEV] ::class wrong case

2015-05-31 Thread Stanislav Malyshev
Hi! > That's annoying as I like to check the right class case on autoload to > detect mistakes. I'm not sure I understand this right, but if I do this sounds contradictory. I.e., if you are trying to autoload the class, you haven't loaded it yet. If you didn't, how would you know which case is "r

Re: [PHP-DEV] ::class wrong case

2015-05-26 Thread Levi Morrison
On Tue, May 26, 2015 at 9:52 AM, Ralph Schindler wrote: > > >> > >> namespace foo; >> >> function bar(){} >> >> var_dump(bar::class); // string(7) "foo\bar" >> >> ?> >> >> This was not explained in the RFC at all, and had I known this I would >> have voted against it personally. > > > How would yo

Re: [PHP-DEV] ::class wrong case

2015-05-26 Thread Ralph Schindler
This was not explained in the RFC at all, and had I known this I would have voted against it personally. How would you suggest it be different, if not a "compile-time name expansion for classes"? On a personal note, I've gotten plenty of benefit from the feature which (again, for me) to

Re: [PHP-DEV] ::class wrong case

2015-05-25 Thread Nikita Nefedov
On Mon, 25 May 2015 20:47:32 +0300, Marc Bennewitz wrote: Hi, I have noted that detecting a class name using "::class" it will return the called case instead of the original case. see http://3v4l.org/97K36 That's annoying as I like to check the right class case on autoload to detect mist

Re: [PHP-DEV] ::class wrong case

2015-05-25 Thread Levi Morrison
On Mon, May 25, 2015 at 11:47 AM, Marc Bennewitz wrote: > Hi, > > I have noted that detecting a class name using "::class" it will return the > called case instead of the original case. > see http://3v4l.org/97K36 > > That's annoying as I like to check the right class case on autoload to > detect