I\'ve added some simple inoremap commands to my .vimrc to help with parens and brackets completion, but I only want them to apply to php files.
inoremap
.vimrc
Add them to the ftplugin file in the after directory:
~/.vim/after/ftplugin/php.vim
More info in this answer.
Edit: This file, and maybe even the directory, will not be there by default. You may have to make it if you don't see it there.