In fact calls to this function are perfectly cacheable by op-caches and
can be optimized near zero. This would be a *great performance gain* for
this 10% Reflection usecases.
cryptocompress
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.
sorry, i pollute this thread with discussion about reflection...
Am 27.02.2013 19:19, schrieb Nikita Popov:
> Why the heck do we want to get rid of Reflection?
> Do we want to alias *all* Reflection methods in this way?
definitely not, but:
I can access all properties of an object without reflec
On Wed, Feb 27, 2013 at 7:12 PM, Crypto Compress <
cryptocompr...@googlemail.com> wrote:
> "Get rid of ~10% of all reflection usecases with only one function."
>
> This is really an exorbitant shiny argument on its own. Simple too good to
> be true. What am i missing? :)
>
You're missing: Why the
"Get rid of ~10% of all reflection usecases with only one function."
This is really an exorbitant shiny argument on its own. Simple too good
to be true. What am i missing? :)
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Am 27.02.2013 18:16, schrieb Mike Willbanks:
how many times this is done
a quick search on GitHub for:
- "ReflectionClass" (PHP/Code): 240,922
- "getConstants" (PHP/Code): 22,208
This search is not accurate nor representative but there are some more
usecases in this results.
cryptocompress
> I am simply suggesting an alternative to using Reflection whereas:
>>
>> get_class_constants([object|**string]);
>> get_object_constants([object])**;
>>
>> Do we need both; probably not; the first would likely do.
>>
>
> +1 for the first one only
>
>
> Am 27.02.2013 16:12, Analyst (Frank Schenk)
Am 27.02.2013 16:58, schrieb Mike Willbanks:
I am simply suggesting an alternative to using Reflection whereas:
get_class_constants([object|string]);
get_object_constants([object]);
Do we need both; probably not; the first would likely do.
+1 for the first one only
Am 27.02.2013 16:12, Anal
>
> > thank you! It is a useful feature to me.
> >
> > class MyBitmask {
> > const POS_1 = 1;
> > //const POS_2 = 2;// reserved/undefined
> > //const POS_3 = 3;// reserved/undefined
> > const POS_4 = 4;
>
> I'm developing software with PHP since version 2 and i'm
2013/2/27 Frank Schenk
> Hi Crypto Compress,
>
> big congratz to that name, your mummy Hash Compress and your daddy Image
> Compress must be very proud!
>
> SCNR
>
> Am 02/27/2013 03:54 PM, schrieb Crypto Compress:
> > Hello Mike,
> >
> > thank you! It is a useful feature to me.
> >
> > class MyB
Hi Crypto Compress,
big congratz to that name, your mummy Hash Compress and your daddy Image
Compress must be very proud!
SCNR
Am 02/27/2013 03:54 PM, schrieb Crypto Compress:
> Hello Mike,
>
> thank you! It is a useful feature to me.
>
> class MyBitmask {
> const POS_1 = 1;
> //const
Hello Mike,
thank you! It is a useful feature to me.
My usecase are checks on defined constants:
e.g. on my Bitmasks i want to check if given position-value is valid for
current bitmask: http://3v4l.org/CR2qJ
e.g. in my Exception Handler i check Exception-Codes: if not defined in
Exception cla
Hi!
> Before drafting an RFC I would like to gauge interest in adding:
> get_object_constants and get_class_constants
>
> Currently this can only be done through ReflectionClass which is far slower
> than retrieving them directly from the constants table. Some simple
> timings show that through
> >> Before drafting an RFC I would like to gauge interest in adding:
> >> get_object_constants and get_class_constants
> >>
> >> I have already drafted up a PR with the changes and supplemental data:
> >> https://github.com/php/php-src/pull/292
> >>
> You took the time to make a PR, but not an RFC
>> Before drafting an RFC I would like to gauge interest in adding:
>> get_object_constants and get_class_constants
>>
>> I have already drafted up a PR with the changes and supplemental data:
>> https://github.com/php/php-src/pull/292
>>
You took the time to make a PR, but not an RFC? This should
On Tue, Feb 26, 2013 at 4:19 PM, Mike Willbanks wrote:
> Hello All,
>
> Before drafting an RFC I would like to gauge interest in adding:
> get_object_constants and get_class_constants
>
> Currently this can only be done through ReflectionClass which is far slower
> than retrieving them directly f
15 matches
Mail list logo