TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
495 B
16 lines
495 B
<?php
|
|
|
|
require __DIR__ . '/vendor/autoload.php';
|
|
|
|
use PhpAot\Php\CompilerBase;
|
|
use League\CLImate\CLImate;
|
|
|
|
$climate = new CLImate();
|
|
$compiler = new CompilerBase($climate);
|
|
$ref = new ReflectionMethod($compiler, 'getPhpxDir');
|
|
$ref->setAccessible(true);
|
|
|
|
echo "Testing getPhpxDir()...\n";
|
|
echo "PHPX_HOME env: " . (getenv('PHPX_HOME') ?: '(not set)') . "\n";
|
|
echo "Result: " . $ref->invoke($compiler) . "\n";
|
|
echo "Directory exists: " . (is_dir($ref->invoke($compiler)) ? 'YES' : 'NO') . "\n";
|
|
|