note 97978 added to function.mt-rand
| From: | nilesh at itech7 dot com | Date: | Wed, 19 May 2010 08:43:16 +0000 |
| Subject: | note 97978 added to function.mt-rand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-169393@lists.php.net to get a copy of this message | ||
Oops, there is a typo in the RandomString generator I wrote.
<?php
public function __construct($length = 15) {
$this->_length = 10;
}
?>
needs to be changed to
<?php
public function __construct($length = 15) {
$this->_length = $length;
}
?>
Heh, what an awesome typo. I was thinking stringlength = 10 at that time.
----
Server IP: 59.162.86.123
Probable Submitter: 121.246.205.20
----
Manual Page -- http://www.php.net/manual/en/function.mt-rand.php
Edit -- https://master.php.net/note/edit/97978
Del: integrated -- https://master.php.net/note/delete/97978/integrated
Del: useless -- https://master.php.net/note/delete/97978/useless
Del: bad code -- https://master.php.net/note/delete/97978/bad+code
Del: spam -- https://master.php.net/note/delete/97978/spam
Del: non-english -- https://master.php.net/note/delete/97978/non-english
Del: in docs -- https://master.php.net/note/delete/97978/in+docs
Del: other reasons-- https://master.php.net/note/delete/97978
Reject -- https://master.php.net/note/reject/97978
Search -- https://master.php.net/manage/user-notes.php