note 75314 rejected from control-structures.for by tularis
| From: | tularis@php.net | Date: | Fri, 25 May 2007 23:08:17 +0000 |
| Subject: | note 75314 rejected from control-structures.for by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-126927@lists.php.net to get a copy of this message | ||
Note Submitter: matt at rawintegrated dot com
----
A caveat I just discovered: when using constants in expr3, make absolutely certain they've been
defined--particularly when you've disabled notices.
Example:
for ($i = 0; $i < 60; $i += MINUTE_STEP) {
// code code code
}
If you haven't defined MINUTE_STEP, this will barf all over your memory, filling $i with
0ConstantConstantConstant... until your arena's full and PHP dies, leaving the strange
"Allowed memory size of 33554432 bytes exhausted (tried to allocate 44 bytes)" error in
your Apache log.