Skip to content

Instantly share code, notes, and snippets.

@allysonsouza
Last active May 10, 2023 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allysonsouza/719cf200febe36b5a022f9b092360c2b to your computer and use it in GitHub Desktop.
Save allysonsouza/719cf200febe36b5a022f9b092360c2b to your computer and use it in GitHub Desktop.
[PHP CLI Commands] #php

PHP CLI Commands

Show version

php --version

Display instaled modules

php -m -c

Run server on given port

php -S localhost:8888

Interactive shell

php -a

Check error_log path

echo pathinfo(ini_get('error_log'),PATHINFO_DIRNAME);

php.ini path

php --ini

Extension is installed?

php -r "printf('Extension loaded: %s' . PHP_EOL, extension_loaded('xdebug') ? 'Yes' : 'No');"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment