Php port

php port modernization:
1. Can change template php code
2. Can use only $1 in PHP-code
3. Add grammar example
4. Fix error syntax error message didn't show