note 74085 added to function.each
| From: | rajbot at gmail dot com | Date: | Fri, 23 Mar 2007 16:57:34 +0000 |
| Subject: | note 74085 added to function.each | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124751@lists.php.net to get a copy of this message | ||
this may have been super-obvious to others, but if you try to use an 'explode' with
'each', you hear a little yelp from your server as the php module goes straight into an
infinite loop until hitting the php.ini memory or execution limits.
just fyi, dogg.
example:
<?php
$string="clearly, this is not going to go well, my friend";
while (list($key, $value)=each(explode(',',$string))) {
print "IM IN UR SERVER EATENG UR MEM ";
}
?>
----
Server IP: 64.71.164.2
Probable Submitter: 198.71.26.251
----
Manual Page -- http://www.php.net/manual/en/function.each.php
Edit -- https://master.php.net/note/edit/74085
Del: integrated -- https://master.php.net/note/delete/74085/integrated
Del: useless -- https://master.php.net/note/delete/74085/useless
Del: bad code -- https://master.php.net/note/delete/74085/bad+code
Del: spam -- https://master.php.net/note/delete/74085/spam
Del: non-english -- https://master.php.net/note/delete/74085/non-english
Del: in docs -- https://master.php.net/note/delete/74085/in+docs
Del: other reasons-- https://master.php.net/note/delete/74085
Reject -- https://master.php.net/note/reject/74085
Search -- https://master.php.net/manage/user-notes.php