2017 © Pedro Peláez
 

library rand

image

jsnlib/rand

  • Friday, March 30, 2018
  • by fdjkgh580
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 100 % Grown

The README.md

jsnlib-rand

取得多種形式的亂數, (*1)

初始化, (*2)

require_once 'vendor/autoload.php';
$rand = new Jsnlib\Rand;

取得一筆亂數, (*3)

$rand->get(5, [1, 2, 3])[0];
// => 1x3DX

取得多筆單數, (*4)

// 取得10筆亂數
$result = $rand->get(10, [1, 2, 3], 10);
foreach ($result as $val) 
{
    echo $val."<br>";
}
// => 
// SL47CUGOPq
// Y1pTRHLXIj
// nkKhGd9f57
// lfX7s1qwYs
// Z788ZARX9g
// 9YcCLzh0lU
// 1k10G9Z5b1
// wef8i9JLf3
// 3x969P4ie8
// o5K00e0c4I

get_np(int $length, array $type, int $quality = 1): array

取多個不重複字串 - length:要顯示的文字長度 - quality: 數量 - $type:1是數字,2是英文大寫,3是英文小寫。使用字串指定,例如 "1,3" 即亂數僅可出現數字與英文小寫, (*5)

The Versions

30/03 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

array object rand

30/03 2018

1.1.1

1.1.1.0

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

array object rand

30/03 2018

1.1.0

1.1.0.0

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

array object rand

29/03 2018

1.0.2

1.0.2.0

  Sources   Download

MIT

The Requires

  • php >=5.2.4

 

array object arrayobject convert

09/03 2018

1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

  • php >=5.2.4

 

array object arrayobject convert

09/03 2018

1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

  • php >=5.2.4

 

array object arrayobject convert