CONST VALUES.
-1 but yes for matematical (or logical) operation like this :
class foo
{
const OPTION_1 = 1 << 0;
const OPTION_2 = 1 << 1;
const OPTION_3 = 1 << 2;
const OPTION_4 = 1 << 3;
}
4. PARAMETER ORDER.
+1
Thank you for your time,
ue, or
literal, and generate a notice for the developer to change the const to
literal for gaining performance.
What do you think?
Tyrael
That's could be very useful to define flag, something like that :
class foo {
const CASE_1 = 1 << 1;
const CASE_2 = 1 << 2;
tant should not be incremented
but should
be shifted left.
After the manner which is implemented don't affect me. Can be a " enum
" keyword
or a stuff like " iota ".
--
Alban Leroux
s...@paradoxal.org
Web developper
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
oblem i see, is could be a name conflict like :
function Foo() {
// ...
}
class Foo() {
public __create() {
// ...
}
}
Foo(); // Instanciate the class or call the function ?
I hope this idea can help/inspire you.
Regards,
--
Alban Leroux
s...@paradoxal.org
Web developper
--
PHP Internals - PHP
cost, that we gain.
If we want this functionality, then Mathieu Suen's idea is better IMHO:
http://www.mail-archive.com/internals@lists.php.net/msg46764.html
eg. (new Foo())->bar()
Tyrael
Yes my only possible objection is that's less readable.
--
Alban Leroux
s...@paradoxal.org
W
t your (non-Windows) prompt you get a nice little
> description of what it does.
>
> -Rasmus
>
--20cf307d046c3ddbde049fcb0b8f--
--
Alban Leroux
s...@paradoxal.org
Web developper
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php