| 1 | <?php |
||
| 10 | class Environment |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Get current operation system full name |
||
| 14 | * @return string |
||
| 15 | */ |
||
| 16 | public static function osName() |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Get working API type (apache2handler, cgi, fcgi, etc) |
||
| 23 | * @return string |
||
| 24 | */ |
||
| 25 | public static function phpSAPI() |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get current php version and small build info |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | public static function phpVersion() |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get load average in percents. |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | public static function loadAverage() |
||
| 72 | } |
If you suppress an error, we recommend checking for the error condition explicitly: