Skip to content

Instantly share code, notes, and snippets.

@marek-saji
Created November 18, 2013 15:12
Show Gist options
  • Save marek-saji/7529381 to your computer and use it in GitHub Desktop.
Save marek-saji/7529381 to your computer and use it in GitHub Desktop.
Bootstrapped interactive php shell
phpsh () {
BOOTSTRAP_FILE="$(
DIR="$( git rev-parse --show-toplevel 2>/dev/null || echo . )"
ls "$DIR/bootstrap.php" "$DIR/scripts/foo.php" 2>/dev/null | head -n1
)"
php -a -d xdebug.cli_color=1 -d auto_prepend_file="$BOOTSTRAP_FILE" "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment