inline functions
| From: | Michael McGlothlin | Date: | Tue, 30 Oct 2007 18:20:48 +0000 |
| Subject: | inline functions | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-32991@lists.php.net to get a copy of this message | ||
I'm not sure if this is the proper place to make a suggestion - if not please correct me.
It'd be useful to have an inline function similar to create_function () but so that it'd only be used that once and would return the function results rather than the function itself. I often find myself writing long sections of code that aren't repetitive and I have to either create a function that'll only be used once, which pollutes my name space, or allow myself to have code mush. With an inline function I could mark blocks of code so that inputs and outputs would be cleaner and memory could be released more easily. This would make code easier to read, reduce accidental re-use of variables, and reduce memory usage.
Thanks,
Michael McGlothlin
http://www.plumbersstock.com/