NonGNU ELPA - php-mode


Major mode for editing PHP code
php-mode-1.25.1.tar (.sig), 2024-Mar-31, 710 KiB
USAMI Kenta <>
Atom feed
Browse ELPA's repository
CGit or Gitweb

To install this package from Emacs, use package-install or list-packages.

Full description

PHP Mode is a major mode for editing PHP script.  It's an extension
of CC mode; thus it inherits all C mode's navigation functionality.
But it colors according to the PHP syntax and indents according to the
PSR-2 coding guidelines.  It also includes a couple handy IDE-type
features such as documentation search and a source and class browser.

Please read the manual for setting items compatible with CC Mode.

This mode is designed for PHP scripts consisting of a single <?php block.
We recommend the introduction of Web Mode for HTML and Blade templates combined with PHP.

Modern PHP Mode can be set on a project basis by .dir-locals.el.
Please read php-project.el for details of directory local variables.

If you are using a package manager, you do not need (require 'php-mode) in
your ~/.emacs.d/init.el.  Read the README for installation instructions.

Old versions

php-mode-1.25.0.tar.lz2023-Jul-23 101 KiB
php-mode-1.24.3.tar.lz2023-Mar-19 101 KiB
php-mode-1.24.2.tar.lz2022-Nov-1296.0 KiB
php-mode-1.24.1.tar.lz2022-Sep-0868.9 KiB
php-mode-1.24.0.tar.lz2021-Aug-2976.4 KiB


Changes for PHP Mode by Version

All notable changes of the PHP Mode 1.19.1 release series are documented in this file using the Keep a CHANGELOG principles.

[1.25.1] - 2023-11-24

  • Add php-topsy-beginning-of-defun-with-class to display classname with function signature. ([#766])
  • Add missing __DIR__ to php-magical-constants ([#756], thanks [@piotrkwiecinski])
  • Make developer build task in Makefile now depends on Eask. ([#762], thanks [@jcs090218])
    • This change does not affect package installation users
    • Read [] if you prefer to build it yourself from zip or tar ball
  • Fixed build failure in Emacs on master branch ([#764], [#765], [#767], thanks [@takeokunn])
  • Removed Phan-specific features from php-project ([#754])
  • Removed Cask and Keg metadata files for building ([#770])

[1.25.0] - 2023-07-24

  • Support Emacs 29.1 ([#743], [#750])
  • Fixed many byte compilation errors on Emacs 29 and 30 by multiple patches contributed by [Stefan Monnier] ([#737], [#739] and [#740], thanks Stefan!)
  • Fixed PEAR method chaining wrong indentation ([#745] and [#746], thanks [@cweiske]!)
  • Fixed php-mode-debug-reinstall command ([#747], [#748])
  • Drop Emacs 25 support ([#729], [736])

[1.24.3] - 2023-03-19

  • Net feature: php-format ([#731])
    • Add php-format-project and php-format-this-buffer-file commands
    • Add php-format-auto-mode minor mode
  • Experimental feature: php-ide ([#709])
    • Add php-ide-phpactor as simple IDE feature without LSP clients
    • Add php-ide-mode minor mode for binding IDE-like features
  • Fix array indentation broken by commenting out ([#726], [#732])
  • No longer highlights 'link in PHPDoc ([#724])
    • Please use goto-address-prog-mode minor mode

[1.24.2] - 2022-11-13

  • New feature: php-complete
    • Add php-complete-complete-function to autocomplete function names ([#708])
  • New feature: php-flymake
    • Add php-flymake as a flymake backend compatible with Emacs 26 and above ([#718])
  • Supports PHPDoc tags and types for static analysis tools ([#710], [#715], [#716], [#717], thanks to [@takeokunn]) ... ...