Wiki
php-mode / Home
Emacs php-mode
WHAT IS
php-mode is a set of tools to increase productivity in Emacs when programming PHP.
It can be used in conjunction with any other pre-existing PHP mode for Emacs.
HOW TO INSTALL
1. Download the official PHP documentation (in HTML format) from:
http://www.php.net/download-docs.php
Please ensure you download the "Many HTML files" zipped file.
2. Untar the documentation files into your favourite location:
tar -xvzf php_manual_en.tar.gz
* NOTE: FROM NOW ON, WE WILL ASSUME YOU EXTRACTED THE PHP DOC IN /phpdoc/html
3. Copy the provided browse-php-doc.el file into your favourite location:
mkdir ~/php-mode
cp browse-php-doc.el ~/php-mode
4. Edit your /.emacs file so it contains the following lines:
(setq phpdoc-root-dir "~/phpdoc/html")
(setq load-path (cons "~/php-mode" load-path))
(load "browse-php-doc")
5. Restart Emacs
6. From now on the following command will be available:
M-x browse-php-doc ENTER
A "Search:" label will show up, allowing you to browse the whole PHP documentation.
For example, if you're looking for the stripslashes function, you can just type:
Search: function.stripslashes
Your browser should start up and the documentation page for the selected function should appear.
* PLEASE NOTE THAT TAB COMPLETION SHOULD BE AVAILABLE WHEN SEARCHING FUNCTIONS.
Troubleshooting
Feel free to contact me if you problems in getting this working.
Licence
This code is released under GNU GPLv3 license.
Credits
The browse-php-doc.el file is based on Magnus Henoch's browse-erlang-doc.el one, released under WTFPL licence and available for download at:
http:forum.trapexit.org/viewtopic.php?p=44248&sid=cfc162ee3e2cbcc16b9af5e20a2bc85a
Updated