Skip to content

Commit

Permalink
Merge pull request #9779 from Nicelocal/enable_opcache_if_installed
Browse files Browse the repository at this point in the history
Enable opcache if it is installed
  • Loading branch information
orklah committed May 11, 2023
2 parents 841cccd + acdbffb commit 5661ea6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Psalm/Internal/Cli/Psalm.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
use function json_encode;
use function max;
use function microtime;
use function opcache_get_status;
use function parse_url;
use function preg_match;
use function preg_replace;
Expand Down Expand Up @@ -923,11 +922,7 @@ private static function restart(array $options, int $threads, Progress $progress
// If Xdebug is enabled, restart without it
$ini_handler->check();

if (!function_exists('opcache_get_status')
|| !($opcache_status = opcache_get_status(false))
|| !isset($opcache_status['opcache_enabled'])
|| !$opcache_status['opcache_enabled']
) {
if (!function_exists('opcache_get_status')) {
$progress->write(PHP_EOL
. 'Install the opcache extension to make use of JIT on PHP 8.0+ for a 20%+ performance boost!'
. PHP_EOL . PHP_EOL);
Expand Down

0 comments on commit 5661ea6

Please sign in to comment.