adding php/json syntax hint

Incorporating comments from @dereuromark
Adding example and public methods.