Add PHP code snippets to docs

Inserts PHP code into the documentation.