Re: [PHP-DEV] Performance question about create_function

2009-10-29 Thread Karsten Dambekalns
Hi. On 26.10.09 15:25, Mathieu Suen wrote: > I am more asking about performance. I would have been ready to sacrifice performance if it saved money. But according to my quick tests, it does not. See http://tr.im/DrsH for details... oh, this is on PHP 5.3. Any other insights on this welcome! Reg

Re: [PHP-DEV] Performance question about create_function

2009-10-26 Thread troels knak-nielsen
On Mon, Oct 26, 2009 at 3:25 PM, Mathieu Suen wrote: > Yes that the same but only for PHP <= 5.3. > I am more asking about performance. You mean PHP < 5.3 ? In that case, I would strongly suggest that you use a procedural style. create_function is slow, leaks memory and offers no compile-time va

Re: [PHP-DEV] Performance question about create_function

2009-10-26 Thread Mathieu Suen
Yes that the same but only for PHP <= 5.3. I am more asking about performance. Michael Stillwell a écrit : On Mon, Oct 19, 2009 at 1:13 PM, Mathieu Suen wrote: Looking at the way array_map is working, it could worth to use create_function for object. For example if I got a list of object:

Re: [PHP-DEV] Performance question about create_function

2009-10-24 Thread Michael Stillwell
On Mon, Oct 19, 2009 at 1:13 PM, Mathieu Suen wrote: > Looking at the way array_map is working, it could worth to use > create_function for object. > > For example if I got a list of object: > > $callback = create_function($element, 'return $selement->getId();'); > $ids = array_map($callback, $so

[PHP-DEV] Performance question about create_function

2009-10-19 Thread Mathieu Suen
Hi, Looking at the way array_map is working, it could worth to use create_function for object. For example if I got a list of object: $callback = create_function($element, 'return $selement->getId();'); $ids = array_map($callback, $someInstances); But I don't know if it's cost a lot in perf