Documentation

Class Phalcon\Random

Source on GitHub

<?php

  $random = new \Phalcon\Random();

  // Random alnum string
  $alnum = $random->alnum();

Constants

integer COLOR_RGB

integer COLOR_RGBA

Methods

public static alnum ([unknown $len])

Generates a random alnum string

<?php

  $random = new \Phalcon\Random();
  $alnum = $random->alnum();

public static alpha ([unknown $len])

Generates a random alpha string

<?php

  $random = new \Phalcon\Random();
  $alpha = $random->alpha();

public static hexdec ([unknown $len])

Generates a random hexdec string

<?php

  $random = new \Phalcon\Random();
  $hexdec = $random->hexdec();

public static numeric ([unknown $len])

Generates a random numeric string

<?php

  $random = new \Phalcon\Random();
  $numeric = $random->numeric();

public static nozero ([unknown $len])

Generates a random nozero numeric string

<?php

  $random = new \Phalcon\Random();
  $bytes = $random->nozero();

public static color ([unknown $type])

Generates a random color