-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathphpdraft
More file actions
executable file
·41 lines (37 loc) · 737 Bytes
/
phpdraft
File metadata and controls
executable file
·41 lines (37 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env php
<?php
declare(strict_types=1);
/**
* Set up include path for source handling
*/
set_include_path(get_include_path() . ":" . __DIR__ . '/src/');
/**
* Set up required classes (with the autoloader)
*/
require_once 'vendor/autoload.php';
use PHPDraft\In\CLI;
define('VERSION', '0');
//define('ID_STATIC', 'SOME_ID');
try
{
$cli = new Cli();
$cli->run();
}
catch (Exception $exception)
{
file_put_contents('php://stderr', $exception->getMessage() . PHP_EOL);
exit($exception->getCode());
}
function phpdraft_var_dump(...$vars)
{
if (defined('__PHPDRAFT_PHAR__'))
{
return;
}
echo '<pre>';
foreach ($vars as $var)
{
var_dump($var);
}
echo '</pre>';
}