[wp-trac] [WordPress Trac] #42782: wp_rand() should have inline docs to describe its purpose

WordPress Trac noreply at wordpress.org
Sun Dec 3 18:29:39 UTC 2017


#42782: wp_rand() should have inline docs to describe its purpose
----------------------------+-----------------------------
 Reporter:  webdevmattcrom  |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:  docs            |
----------------------------+-----------------------------
 Developers could easily wonder why wp_rand() exists when PHP already has
 rand() and mt_rand(). Explaining it's purpose and usefulness in inline
 docs will be helpful. It's also necessary for DevHub.

 Suggested Description:
 "WordPress uses wp_rand() in order to create hashes and passwords that are
 far less predictable than the similar PHP native functions like rand() and
 mt_rand()."

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42782>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list