Browse Source

Use PHP_SAPI constant instead of function

Joanhey 6 years ago
parent
commit
68322257ef
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Worker.php

+ 1 - 1
Worker.php

@@ -542,7 +542,7 @@ class Worker
     protected static function checkSapiEnv()
     {
         // Only for cli.
-        if (\php_sapi_name() !== 'cli') {
+        if (PHP_SAPI !== 'cli') {
             exit("only run in command line mode \n");
         }
         if (DIRECTORY_SEPARATOR === '\\') {