1. The syntax detection is from the various *.lang files in /usr/share/gtksourceview-2.0/language-specs. This establishes a set of context ids. To find list of contexts defined in php.lang for example
grep 'context id' php.lang
2. If you review php.lang, you will find that the PHP if statement is lumped together with a number of other keywords into a single context called 'keyword'.
3. Now if you go to the /usr/share/gtksourceview-2.0/styles directory, you will find a number of theme .xml files. Copy any one of them to make a new file, say myspec.xml, and then insert a statement like
Note the keyword in php:keyword here refers to the id of the context specified in php.lang.
<style name="php:keyword" foreground="#FF0000" bold="true"/>
4. Now start gedit, and in Edit->Preferences, Add.. and then select your myspec.xml file created in step 3 above. Now all your PHP keywords will be red.
If you want the if keyword to be colored differently from other keywords, you will need to edit the php.lang file to remove if from the 'keyword' context, and create its own context with an id (for example, let's say the new context id is 'if'), then you can use php:if in your myspec.xml file.
Hope this helps.