Is this optimization?
Well, look this please.
PHP Code:
Is it optimization create a static to do that, or I just use read_data(2) without creating a static variable? Why? |
Re: Is this optimization?
Using 'new' is just fine. It's not like it's gonna be used a lot of times.
PHP Code:
|
Re: Is this optimization?
You should use new, not static there. Do how you like, use directly the native or save it in a variable, doesn't matter.
For the ones saying that he is creating a variable for nothing, please think about readability and also know that micro optimization does not worth. |
| All times are GMT -4. The time now is 20:43. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.