1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 01:34:40 +01:00
MadelineProto/tests/jit.php

25 lines
496 B
PHP
Raw Normal View History

2023-11-19 19:23:02 +01:00
<?php declare(strict_types=1);
2023-11-19 19:14:51 +01:00
2023-12-23 20:35:35 +01:00
$ok = true;
2024-04-07 15:05:55 +02:00
foreach (['pcntl', 'uv', 'ffi', 'pgsql', 'memprof', 'intl', 'gmp', 'mbstring', 'pdo_mysql', 'xml', 'dom', 'iconv', 'zip', 'igbinary', 'gd'] as $ext) {
2023-12-23 20:35:35 +01:00
if (!extension_loaded($ext)) {
$ok = false;
echo "$ext is not enabled!".PHP_EOL;
}
}
2023-12-31 13:42:58 +01:00
$status = opcache_get_status();
2023-11-19 19:14:51 +01:00
var_dump($status);
if (!$status["jit"]["on"]) {
echo "JIT is not enabled!".PHP_EOL;
die(1);
2023-12-31 13:42:58 +01:00
}
2023-11-19 19:14:51 +01:00
2023-12-23 20:35:35 +01:00
if (!$ok) {
die(1);
}
2023-11-19 19:14:51 +01:00
echo "OK!".PHP_EOL;
2023-11-19 19:23:02 +01:00
die(0);