bindAPI/bin/console
2024-07-09 19:03:48 +02:00

21 lines
677 B
PHP
Executable File

#!/usr/bin/env php
<?php declare(strict_types=1);
namespace App\Controller;
if (php_sapi_name() !== 'cli') {
echo 'This application must be run on the command line.' . PHP_EOL;
exit;
}
// check php version (must be >= 8.1)
/** @noinspection PhpArgumentWithoutNamedIdentifierInspection */
if (version_compare(PHP_VERSION, '8.2.0', '<')) {
echo 'This application requires PHP 8.2 or newer. You are running ' . PHP_VERSION . PHP_EOL;
echo 'If you are using KeyHelp, use keyhelp-php82 ' . $argv[0] . ' instead.' . PHP_EOL;
exit;
}
/** @noinspection PhpArgumentWithoutNamedIdentifierInspection */
require dirname(__DIR__, 1) . '/src/Utilities/Console.php';