sponsor Vim development Vim logo Vim Book Ad

php.vim : PHP syntax file updated for PHP 5.3

 script karma  Rating 102/56, Downloaded by 6254  Comments, bugs, improvements  Vim wiki

created by
Paul Garvin
script type
This is an updated version of the php.vim syntax file distributed with VIM. The list of PHP constants, functions, and classes was updated to be current with PHP 5.3. Many new classes were added in the 5.2 branch and the distributed version only covers up to 5.1.4. In addition I simplified the file, removing several sections that are not often used (at least by me) such as automatic folding of all control structures and ASP tags support. I also removed several switches designed for b/c with VIM 5.X and 6.X. As an addition I have included the PHP file I used to generate the constant, function, class list. It uses reflection to mine out these items from your PHP installation and generate part of the php.vim script. Before running open up the file and adjust the output file location and the list of extensions to generate syntax for. Then run "php php_vimgen.php" from your shell.
install details
Create the following directory if it does not already exist and place php.vim inside of it.
Unix: /home/<username>/.vim/syntax/
Windows up to & incl XP: C:\Documents and Settings\<username>\_vim\syntax\
Windows Vista & 7: C:\Users\<username\_vim\syntax\

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
php53.tar.gz 1.1 2010-04-02 7.0 Paul Garvin Added missing keyword 'default'. Added highlighting of escaped single quotes, double quotes, backslashes, and dollar signs in strings. Shows up same color as \r, \n & friends.
php53.tar.gz 1.0 2009-11-29 7.0 Paul Garvin Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.