php-mode 
- Description
- Major mode for editing PHP code
- Latest
- php-mode-1.28.0.tar (.sig), 2026-Aug-25, 870 KiB
- Maintainer
- USAMI Kenta <tadsan@zonu.me>
- Website
- https://github.com/emacs-php/php-mode
- Browse ELPA's repository
- CGit or Gitweb
- Badge
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. https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html 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. http://web-mode.org/ 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. https://github.com/emacs-php/php-mode
Old versions
| php-mode-1.26.1.tar.lz | 2024-Sep-13 | 95.5 KiB |
| php-mode-1.25.1.tar.lz | 2024-Mar-31 | 94.4 KiB |
| php-mode-1.25.0.tar.lz | 2023-Jul-23 | 101 KiB |
| php-mode-1.24.3.tar.lz | 2023-Mar-19 | 101 KiB |
| php-mode-1.24.2.tar.lz | 2022-Nov-12 | 96.0 KiB |
| php-mode-1.24.1.tar.lz | 2022-Sep-08 | 68.9 KiB |
| php-mode-1.24.0.tar.lz | 2021-Aug-29 | 76.4 KiB |
News
Changes for PHP Mode by Version
This file documents notable changes to PHP Mode according to the Keep a Changelog principles.
[1.28.0] - 2026-08-25
Added
- Add
php-phpdbg-disassemble-fileandphp-parse-filecommands ([#804]) - Select an HTML template major mode for PHP files that contain HTML and add per-project control through
php-project-php-file-as-template([#742]) - Include
php-align.elandphp-flymake.elin the package ([#820]) - Add a
php-pipe-opface for PHP 8.5's pipe operator ([#821]) - Add
php-ide-set-feature,php-ide-status, andphp-ide-eglot-activatecommands ([#826]) - Add
phpantomandphp-lsppresets tophp-ide-lsp-command-alist([#830]) - Add
php-cc-modeas a forward-compatible alias for the CC Mode basedphp-mode([#828])
Changed
- Add
readonlyclass modifier to [Imenu] ([#802]) - Add
enumsupport tophp-current-class([#802]) - Remove hardcoding of implicit paths in
phpthat are not guaranteed to exist ([#803]) - Make
php-mode-maybehonormajor-mode-remap-alist([#816]) - Let
php-project-get-root-diruseproject.elbackends after PHP-specific markers ([#823]) - Make
php-ide-featuresaccept a bare feature symbol and makephp-ide-turn-ona no-op when no features are configured ([#826]) - Restrict safe directory-local PHP-IDE values and mark command and function alists as risky ([#826])
- Warn about multiple active LSP clients and make PHP-IDE server and mode alists customizable ([#827])
Fixed
- Fix array alignment when an empty line is present ([#801])
- Fix compatibility with upcoming Emacs 32 ([#809])
- Fix PHP function completion sorting, module filtering, and directory-local validation ([#825])
- Fix PHP-IDE feature activation, deactivation, repeated enabling, and Phpactor hover cleanup ([#826], [#827])
- Return a valid
project.elrepresentation fromphp-project-project-find-function([#823]) - Fall back to an HTML mode for Blade templates when
web-modeis unavailable ([#817]) - Use one PHP executable source for project and Flymake integrations ([#818])
- Fix compilation of
php-flymakewith current Emacs versions ([#829])
Deprecated
php-project-use-projectile-to-detect-rootis obsolete; Projectile 3 registers itself onproject-find-functions, whichphp-project-get-root-dirnow consults automatically
Removed
- Drop support for Emacs 27.x ([#811])
[1.27.0] - 2024-12-20
Added
- Support PHP 8.4 property-hooks ([#797])
Changed
- Improve
php-syntax-propertize-extend-regionefficiency ([#789], thanks [@phil-s]!) - Update
php-phpdoc-type-namesto support [PHPStan 2.0.4] ([#795])
Fixed
- Fix Emacs 30 byte-compile errors ([#792])
- Use
when-let*instead ofwhen-letto enhance Emacs 30 compatibility ([#796]) ... ...