note 88161 added to arrayiterator.valid
| From: | jon at springyweb dot com | Date: | Tue, 13 Jan 2009 12:56:06 +0000 |
| Subject: | note 88161 added to arrayiterator.valid | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149138@lists.php.net to get a copy of this message | ||
@kaigillmann
Don't do this:
<?php
public function available($value) {
if (in_array($value, (array)$this))
return true;
else
return false;
}
?>
Just do this:
<?php
public function available($value) {
return in_array($value, (array)$this);
}
?>
----
Server IP: 87.124.35.190
Probable Submitter: 195.69.214.5
----
Manual Page -- http://www.php.net/manual/en/arrayiterator.valid.php
Edit -- https://master.php.net/note/edit/88161
Del: integrated -- https://master.php.net/note/delete/88161/integrated
Del: useless -- https://master.php.net/note/delete/88161/useless
Del: bad code -- https://master.php.net/note/delete/88161/bad+code
Del: spam -- https://master.php.net/note/delete/88161/spam
Del: non-english -- https://master.php.net/note/delete/88161/non-english
Del: in docs -- https://master.php.net/note/delete/88161/in+docs
Del: other reasons-- https://master.php.net/note/delete/88161
Reject -- https://master.php.net/note/reject/88161
Search -- https://master.php.net/manage/user-notes.php