Edit $HOME/.nanorc to contain the following:
include /usr/share/nano/java.nanorc include /usr/share/nano/man.nanorc include /usr/share/nano/nanorc.nanorc include /usr/share/nano/python.nanorc include /usr/share/nano/sh.nanorc include /usr/share/nano/html.nanorc include /usr/share/nano/perl.nanorc include /usr/share/nano/php.nanorc
CentOS 7 uses a much older version of nano than the one that presently ships on most distributions. The php.nanorc on newer The following should appear in /usr/share/nano/php.nanorc on CentOS7 to allow syntax highlighting for php:
## Syntax highlighting for PHP syntax "php" "\.(php[23457s~]?|phtml|ctp)$" # PHP markings. color brightgreen "()" # Function names. color white "\