blob: 0b160a34b14004a550ac18f813252864798d595e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
if (function_exists("uuid_export")) {
echo "Version: ".uuid_version()."\n";
if (uuid_create($uuid)) {
die("Can't create\n");
}
for ($i=0 ; $i<10 ; $i++) {
if (!uuid_make($uuid, UUID_MAKE_V4) && !uuid_export($uuid, UUID_FMT_STR, $str)) {
echo "$i: $str\n";
}
}
uuid_destroy($uuid);
} else if (function_exists("uuid_create")) {
for ($i=0 ; $i<10 ; $i++) {
echo "$i: ".uuid_create()."\n";
}
} else {
die ("No UUID extension\n");
}
|