mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 16:25:39 +08:00
add readline support
This commit is contained in:
@@ -4,5 +4,4 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
bcscale(3);
|
||||
exit(bcdiv('105', '6.55957') === '16.007' ? 0 : 1);
|
||||
assert(function_exists('bcscale'));
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
$str = 'This is bz2 extension test';
|
||||
exit(bzdecompress(bzcompress($str, 9)) === $str ? 0 : 1);
|
||||
assert(function_exists('bzdecompress'));
|
||||
assert(function_exists('bzcompress'));
|
||||
assert(bzdecompress(bzcompress($str, 9)) === $str);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
/** @noinspection PhpComposerExtensionStubsInspection */
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
exit(function_exists('cal_info') && is_array(cal_info(0)) ? 0 : 1);
|
||||
assert(function_exists('cal_info'));
|
||||
assert(is_array(cal_info(0)));
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
exit(function_exists('curl_init') ? 0 : 1);
|
||||
assert(function_exists('curl_init'));
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
/** @noinspection PhpComposerExtensionStubsInspection */
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if (!class_exists('\\DOMDocument')) {
|
||||
exit(1);
|
||||
}
|
||||
assert(class_exists('\\DOMDocument'));
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadHtml("<html><head><meta charset=\"UTF-8\"><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body id='app'>Hello</body></html>");
|
||||
exit($doc->getElementById('app')->nodeValue === 'Hello' ? 0 : 1);
|
||||
assert($doc->getElementById('app')->nodeValue === 'Hello');
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
exit(function_exists('filter_var') ? 0 : 1);
|
||||
assert(function_exists('filter_var'));
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
assert(function_exists('gd_info'));
|
||||
$info = gd_info();
|
||||
$true = ($true ?? true) && ($info['PNG Support'] ?? false);
|
||||
exit($true ? 0 : 1);
|
||||
assert($info['PNG Support'] ?? false);
|
||||
assert($info['GIF Create Support'] ?? false);
|
||||
assert($info['GIF Read Support'] ?? false);
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
exit(class_exists('\\Redis') ? 0 : 1);
|
||||
assert(class_exists('\\Redis'));
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
exit(class_exists('\\ZipArchive') ? 0 : 1);
|
||||
assert(class_exists('\\ZipArchive'));
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
exit(function_exists('gzcompress') ? 0 : 1);
|
||||
assert(function_exists('gzcompress'));
|
||||
|
||||
Reference in New Issue
Block a user