Difference between revisions of "PHP"

From WikEmacs
Jump to: navigation, search
m (added category)
(Update with link to ejmr/php-mode (fork of the original php-mode, but actually maintained))
 
(4 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
There are several modes for editing PHP source files in Emacs.  
 
There are several modes for editing PHP source files in Emacs.  
  
[http://php-mode.sourceforge.net/ PHP-mode] is a basic PHP mode which features syntax highlighting.
+
* [http://php-mode.sourceforge.net/ PHP-mode] is a basic PHP mode which features syntax highlighting.
[http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html nXhtml] is a major mode for editing files with mixed HTML and PHP code.
+
* [https://github.com/ejmr/php-mode ejmr/php-mode] is a fork of the original PHP-mode, but with support for the new features introduced in PHP 5.4 (traits, namespaces and such)
 +
* {{ModeLink|nXhtml}} is a major mode for editing files with mixed HTML and PHP code.
  
 
== Flymake ==
 
== Flymake ==
[http://sachachua.com/blog/2008/07/emacs-and-php-on-the-fly-syntax-checking-with-flymake/ Here] is a great article on setting up a simple PHP flymake mode using the PHP interperter.
+
[http://sachachua.com/blog/2008/07/emacs-and-php-on-the-fly-syntax-checking-with-flymake/ Here] is a great article on setting up a simple PHP [[ flymake ]] mode using the PHP interperter.
  
 
== Debugging PHP code in emacs ==
 
== Debugging PHP code in emacs ==
 
The [http://xdebug.org/ xdebug] extension for PHP is an essential tool for the PHP developer. [http://code.google.com/p/geben-on-emacs/ Geben] is an excellent remote for the xdebug debugger when working inside of emacs.
 
The [http://xdebug.org/ xdebug] extension for PHP is an essential tool for the PHP developer. [http://code.google.com/p/geben-on-emacs/ Geben] is an excellent remote for the xdebug debugger when working inside of emacs.
  
[[Category:Programming]]
+
[[Category:Programming languages]]

Latest revision as of 11:09, 31 March 2012

Emacs Modes for PHP[edit]

There are several modes for editing PHP source files in Emacs.

  • PHP-mode is a basic PHP mode which features syntax highlighting.
  • ejmr/php-mode is a fork of the original PHP-mode, but with support for the new features introduced in PHP 5.4 (traits, namespaces and such)
  • nXhtml is a major mode for editing files with mixed HTML and PHP code.

Flymake[edit]

Here is a great article on setting up a simple PHP flymake mode using the PHP interperter.

Debugging PHP code in emacs[edit]

The xdebug extension for PHP is an essential tool for the PHP developer. Geben is an excellent remote for the xdebug debugger when working inside of emacs.