Phpctags
An enhanced ctags compatible index generator written in pure PHP. Released under GPLv2 license.
Install / Use
/learn @vim-php/PhpctagsREADME
phpctags
An enhanced php ctags index file generator compatible with http://ctags.sourceforge.net/FORMAT.
Using PHP_Parser as PHP syntax parsing backend, written in pure PHP. The generated ctags index file contains scope and access information about classes' methods and properties.
This tool was originally developed to enhance the PHP syntax outline surport for vim tagbar plugin. The enhanced functionality has been included into an addon plugin for tagbar as tagbar-phpctags.
Enjoy!
Download and installation
curl -Ss https://raw.githubusercontent.com/vim-php/phpctags/gh-pages/install/phpctags.phar > phpctags
chmod +x phpctags
Optionally one can move it into a directory on the $PATH:
sudo mv phpctags /usr/local/bin/
Usage
Single file:
phpctags phpfile.php
Tags will be written to a tags file. In order to specify a different tags file
use the -f option:
phpctags -f myphp.tags phpfile.php
Directory with recursive option:
phpctags -f myphp.tags -R target_directory
Build
We currently only support building PHAR executable for *nix like platform which provides
makeutility. If you are interested in building an executable for other platform, especially for Windows, please help yourself out. It should be easy though (Apologize for not being able to provide any help for this, I am really not a Windows guy), it also would be great if someone could provide a patch for this.
Installation is straightforward, make sure you have PHP's PHAR extension enabled,
then run make in the root directory of the source, you will get a phpctags
PHAR executable, add it to your $PATH, then you can invoke phpctags
directly from anywhere.
See phpctags on packagist for more details.
Requirements
- PHP CLI 7.4+
- PHP-Parser
Acknowledgements
- Snapi for composer support.
- DeMarko for memory limit support.
- Sander Marechal for improve console support.
- Mark Wu for building a stand-alone PHAR executable.
- InFog for maintaining the project since 2019.
Related Skills
node-connect
330.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
81.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
330.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
81.3kCommit, push, and open a PR
