note 75314 added to control-structures.for

From: Date: Wed, 23 May 2007 15:43:07 +0000
Subject: note 75314 added to control-structures.for
Groups: php.notes 
Request: Send a blank email to php-notes+get-126847@lists.php.net to get a copy of this message
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. ---- Server IP: 216.235.15.211 Probable Submitter: 209.104.167.90 ---- Manual Page -- http://www.php.net/manual/en/control-structures.for.php Edit -- https://master.php.net/note/edit/75314 Del: integrated -- https://master.php.net/note/delete/75314/integrated Del: useless -- https://master.php.net/note/delete/75314/useless Del: bad code -- https://master.php.net/note/delete/75314/bad+code Del: spam -- https://master.php.net/note/delete/75314/spam Del: non-english -- https://master.php.net/note/delete/75314/non-english Del: in docs -- https://master.php.net/note/delete/75314/in+docs Del: other reasons-- https://master.php.net/note/delete/75314 Reject -- https://master.php.net/note/reject/75314 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#126847) next »