PHP Classes

How Can PHP Detect CLI or Web Environment on Which It Is Running - PHP Web or Cli Detect package blog

Recommend this page to a friend!
  All package blogs All package blogs   PHP Web or Cli Detect PHP Web or Cli Detect   Blog PHP Web or Cli Detect package blog   RSS 1.0 feed RSS 2.0 feed   Blog How Can PHP Detect CL...  
  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Package: PHP Web or Cli Detect

PHP is a flexible language that can run in different environments, for instance, a Web server or a command-line interface shell console.

Developers can create applications that adapt to the different environments in which PHP may run.

This package helps developers who want to adapt to PHP's different environments.

It checks some environment values and returns the information of the specific environment in which it runs.

Using this package, developers only need to adapt their code depending on the environment type that this package returns.




Loaded Article

About the PHP Web or Cli Detect Package

The package PHP Web or Cli Detect is one of the few PHP packages that was considered notable recently because it does something that is worth paying attention.

The basic purpose is: Detect if PHP is running from CLI or a Web server

Here follows in more detail what it does:

This class can detect if PHP is running from CLI or a Web server.

It can check PHP environment variables, constants, and functions to detect the environment in which PHP is running.

Currently, it can return CLI if PHP is running from a command-line interface console shell or return WEB if PHP is running from a Web server.

Conclusion

The PHP Web or Cli Detect can be downloaded from download page or be installed using the PHP Composer tool following instructions in the Composer install instructions page.

This package was considered notable for implementing its benefits in a way that is worth noticing.

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package as well nice prizes.

One nice prize that many PHP developers want and you may like is the PHP elePHPant mascot plush.




You need to be a registered user or login to post a comment

Login Immediately with your account on:



Comments:

No comments were submitted yet.



  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  
  All package blogs All package blogs   PHP Web or Cli Detect PHP Web or Cli Detect   Blog PHP Web or Cli Detect package blog   RSS 1.0 feed RSS 2.0 feed   Blog How Can PHP Detect CL...