Skip to content

Instantly share code, notes, and snippets.

@jwill9999
Last active July 29, 2018 00:12
Show Gist options
  • Save jwill9999/4f4c224e9399b6b550e5fdcf3bedfc8f to your computer and use it in GitHub Desktop.
Save jwill9999/4f4c224e9399b6b550e5fdcf3bedfc8f to your computer and use it in GitHub Desktop.
PHP CLI commands
<?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