Skip to content

Commit ce5b90f

Browse files
authored
Fix CLI environment detection
1 parent 667f593 commit ce5b90f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Runtime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static function isAvailable(?int $status = null): bool
4848
$status ??= self::getStatus();
4949

5050
if ($status === Status::CLI_ENABLED) {
51-
return \strtolower(\PHP_SAPI) === 'cli';
51+
return \in_array(\strtolower(\PHP_SAPI), ['cli', 'phpdbg', 'embed', 'micro'], true);
5252
}
5353

5454
return $status === Status::ENABLED;

0 commit comments

Comments
 (0)