public function uuidV4()
    {
        if (function_exists('random_bytes')) {
            $bytes = random_bytes(16);
        } else {
            $bytes = openssl_random_pseudo_bytes(16);
        }
        $hash = bin2hex($bytes);

        return $this->getFromHash($hash, 4);
    }
public function uuidV4()
    {
        if (function_exists('random_bytes')) {
            $bytes = random_bytes(16);
        } else {
            $bytes = openssl_random_pseudo_bytes(16);
        }
        $hash = bin2hex($bytes);

        return $this->getFromHash($hash, 4);
    }
public function uuidV4 ( ) { if ( function_exists ( 'random_bytes' ) ) { $ bytes = random_bytes ( 16 ) ; } else { $ bytes = openssl_random_pseudo_bytes ( 16 ) ; } $ hash = bin2hex ( $ bytes ) ; return $ this -> getFromHash ( $ hash , 4 ) ; }
Generate UUID version 4

@return string
Generate UUID version 4