Added PHP config format
Fixed spacing issues
Added namespaces to examples
Merge pull request #2083 from WouterJ/add_ref_php_format

Added constraints PHP format and some code tweaks