Re: [PHP-DEV] Direct method call slower than method_exists()

2018-03-09 Thread David Rodrigues
I don't want to prove nothing, just thinking if is possible optimize empty methods to be faster than method_exists(). Em 10 de mar de 2018 1:11 AM, "CHU Zhaowei" escreveu: > What are you trying to prove? We all know method call is expensive. So > definitely it will be slower when you make more c

Re: [PHP-DEV] Direct method call slower than method_exists()

2018-03-09 Thread CHU Zhaowei
What are you trying to prove? We all know method call is expensive. So definitely it will be slower when you make more calls. Best regards, CHU Zhaowei

Re: [PHP-DEV] Direct method call slower than method_exists()

2018-03-08 Thread David Rodrigues
Case #1: https://pastebin.com/cT0gWuNH Case #2: https://pastebin.com/724v9rBZ Case #3: https://pastebin.com/9zXpztCc Case #4: https://pastebin.com/q87p9S4r 2018-03-08 14:52 GMT-03:00 Nikita Popov : > On Thu, Mar 8, 2018 at 6:41 PM, David Rodrigues > wrote: > >> I have take note that a lot of pro

Re: [PHP-DEV] Direct method call slower than method_exists()

2018-03-08 Thread Nikita Popov
On Thu, Mar 8, 2018 at 6:41 PM, David Rodrigues wrote: > I have take note that a lot of projects (like Laravel) prefer uses > method_exists() than implements an empty function (that should be useful to > IDE when it is not annotated as an @method on class). > > For some reason, method_exists() wi

[PHP-DEV] Direct method call slower than method_exists()

2018-03-08 Thread David Rodrigues
I have take note that a lot of projects (like Laravel) prefer uses method_exists() than implements an empty function (that should be useful to IDE when it is not annotated as an @method on class). For some reason, method_exists() will works faster than direct call when method doesn't exists vs. a