Server IP : 127.0.0.2 / Your IP : 3.142.92.19 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/vendor/ramsey/uuid/src/ |
Upload File : |
<?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ namespace Ramsey\Uuid; use Exception; use InvalidArgumentException; use Ramsey\Uuid\Exception\InvalidUuidStringException; use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; /** * Generate a version 1 UUID from a host ID, sequence number, and the current time. * * @param int|string|null $node A 48-bit number representing the hardware address * This number may be represented as an integer or a hexadecimal string. * @param int|null $clockSeq A 14-bit number used to help avoid duplicates that * could arise when the clock is set backwards in time or if the node ID * changes. * @return string * @throws UnsatisfiedDependencyException if called on a 32-bit system and * `Moontoast\Math\BigNumber` is not present * @throws InvalidArgumentException * @throws Exception if it was not possible to gather sufficient entropy */ function v1($node = null, $clockSeq = null) { return Uuid::uuid1($node, $clockSeq)->toString(); } /** * Generate a version 3 UUID based on the MD5 hash of a namespace identifier * (which is a UUID) and a name (which is a string). * * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return string * @throws InvalidUuidStringException */ function v3($ns, $name) { return Uuid::uuid3($ns, $name)->toString(); } /** * Generate a version 4 (random) UUID. * * @return string * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present * @throws InvalidArgumentException * @throws Exception */ function v4() { return Uuid::uuid4()->toString(); } /** * Generate a version 5 UUID based on the SHA-1 hash of a namespace * identifier (which is a UUID) and a name (which is a string). * * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return string * @throws InvalidUuidStringException */ function v5($ns, $name) { return Uuid::uuid5($ns, $name)->toString(); }