Last active
July 29, 2018 00:12
-
-
Save jwill9999/4f4c224e9399b6b550e5fdcf3bedfc8f to your computer and use it in GitHub Desktop.
PHP CLI commands
This file contains 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 | |
# Help | |
php -h; | |
# PHP ini file | |
php -i; | |
# Filter files | |
php -i | grep "memory"; | |
or | |
php -i | findstr "memory; # windows | |
# function information | |
php --rf strtolower; | |
# Class information | |
php --rc DateTime; | |
# Search for classes and function names | |
# Go into interactive shell | |
php -a; | |
# type part of search query such as arr then tab through | |
# exit shell | |
# then | |
php --rf functionName | |
#or | |
php --rc ClassName | |
# start php server from folder or file | |
php -S localhost:$port | |
# run code | |
php -r 'var_dump($argv);' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment