Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 2775307

Browse files
committed
update something. add new lib cli-utils
1 parent bf89011 commit 2775307

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

src/PhpEnv.php

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public static function isPHP(): bool
110110
* setStrict
111111
* @return void
112112
*/
113-
public static function setStrict(): void
113+
public static function setStrict()
114114
{
115115
error_reporting(32767);
116116
}
@@ -119,7 +119,7 @@ public static function setStrict(): void
119119
* setMuted
120120
* @return void
121121
*/
122-
public static function setMuted(): void
122+
public static function setMuted()
123123
{
124124
error_reporting(0);
125125
}
@@ -142,6 +142,22 @@ public static function hasXDebug(): bool
142142
return static::isPHP() && \extension_loaded('xdebug');
143143
}
144144

145+
/**
146+
* @return bool
147+
*/
148+
public static function hasPcntl(): bool
149+
{
150+
return \function_exists('pcntl_fork');
151+
}
152+
153+
/**
154+
* @return bool
155+
*/
156+
public static function hasPosix(): bool
157+
{
158+
return \function_exists('posix_kill');
159+
}
160+
145161
/**
146162
* @param $name
147163
* @param bool|false $throwException
@@ -187,6 +203,6 @@ public static function checkExtList(array $extensions = array())
187203
*/
188204
public static function getLoadedExtension($zend_extensions = false): array
189205
{
190-
return get_loaded_extensions($zend_extensions);
206+
return \get_loaded_extensions($zend_extensions);
191207
}
192208
}

0 commit comments

Comments
 (0)