app/Assets/Helpers.php
/**
	 * Generate an id from current microtime.
	 *
	 * @return string generated ID
	 */
Generate an id from current microtime.
@return string generated ID
Generate an id from current microtime . @return string generated ID
public static function generateID()
	{
		if (
			PHP_INT_MAX == 2147483647
			|| Configs::get_value('force_32bit_ids', '0') === '1'
		) {
			$id = sprintf('%010d', microtime(true));
		} else {
			$id = sprintf('%015.4f', microtime(true));
			$id = str_replace('.', '', $id);
		}
		return $id;
	}
public static function generateID ( ) { if ( PHP_INT_MAX == 2147483647 || Configs :: get_value ( 'force_32bit_ids' , '0' ) === '1' ) { $ id = sprintf ( '%010d' , microtime ( true ) ) ; } else { $ id = sprintf ( '%015.4f' , microtime ( true ) ) ; $ id = str_replace ( '.' , '' , $ id ) ; } return $ id ; }
Generate an id from current microtime.
Generate an id from current microtime .
// Generate id based on the current microtime // For 32-bit installations, we can only afford to store the // full seconds in id.  The calling code needs to be able to // handle duplicate ids.  Note that this also exposes us to // the year 2038 problem. // Ensure 4 digits after the decimal point, 15 characters // total (including the decimal point), 0-padded on the // left if needed (shouldn't be needed unless we move back in // time :-) )