Performance and Function Calls
| From: | CF High | Date: | Sat, 15 Mar 2003 23:41:25 +0000 |
| Subject: | Performance and Function Calls | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-139806@lists.php.net to get a copy of this message | ||
Hey all.
Quick question:
If I have a function that, say, prints out the months in a year, and I call
that function within a 10 cycle loop, which of the following is faster:
1) Have function months() return months as a string; set var
string_months = months() outside of the loop; then echo string_months within
the loop
-- OR
2) Just call months() for each iteration through the loop
I'm not sure how PHP interprets option number 1.
Guidance for the clueless much appreciated...........
--Noah
--