#!/usr/bin/env php
<?php
$autoload = array_filter([
__DIR__ . '/../../autoload.php',
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/vendor/autoload.php'
], function ($file) {
return file_exists($file);
});
if (!count($autoload)) {
fwrite(
STDERR,
'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL .
' composer install' . PHP_EOL . PHP_EOL .
'You can learn all about Composer on https://getcomposer.org/.' . PHP_EOL
);
die(1);
}
require reset($autoload);
$uuid = new \UUID\UUID();
printf("%s\n", $uuid->v1());
|