[PHP-DEV] Re: Idea of optimizing php !empty(...) expression.

2015-02-07 Thread Christoph Becker
Oleg Serov wrote: I use !empty() very often and decided to make a benchmark test. Here is the code and results: http://pastebin.com/fMhhdQiW if (!empty(...)) working on 23% slower than if (empty()) expression. So if create new operator not_empty() it will improve performance. The

[PHP-DEV] Re: Idea of optimizing php !empty(...) expression.

2015-02-07 Thread Oleg Serov
Thanks, with enabled opcache works fine. On 7 February 2015 at 19:35, Christoph Becker cmbecke...@gmx.de wrote: Oleg Serov wrote: I use !empty() very often and decided to make a benchmark test. Here is the code and results: http://pastebin.com/fMhhdQiW if (!empty(...)) working on 23%