Created
September 18, 2017 18:25
-
-
Save arkadiusjonczek/d9debc6c137b0bf5f8d4c2b2c632fdc2 to your computer and use it in GitHub Desktop.
PHP CLI Mode Check #tags: PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if (php_sapi_name() == 'cli') { | |
| // In cli-mode | |
| } else { | |
| // Not in cli-mode | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment