Updated PHP Classes and Samples Added to the MSDN Code Gallery for Bing Ads API

We’ve made some big improvements to the PHP sample package and PHP classes package that are available from the MSDN code gallery. If you’re using PHP to access the Bing Ads API, you’ll want to know about the following changes:

  • Our classes now implement PHP namespaces. Our intention here is to make it easier for developers to write PHP code that can access multiple Bing Ads services side by side. Due to duplication in fault names between services, this was previously a bit cumbersome. Using these new classes will require making a few changes to your code so we’ve updated our PHP sample package to get your started. This change also requires PHP namespace support which was added to PHP in version 5.3.
  • Next, we’ve added extensive in-line documentation which can be displayed on the fly in most of the PHP IDE’s available today (we’ve tested Eclipse and NetBeans). The class level documentation includes a link directly to the relevant page on MSDN and most properties are also documented. This screen shot will give you an idea of what this experience looks like:



  • Along with the inline documentation features, we’re also providing PHP “type-hinting” in the class files. This will give developers auto-complete and documentation when referencing properties to an arbitrary depth. Here’s a screen shot from NetBeans:



We think these features will give our PHP developers a real boost. As always, we’re eager to hear your reactions and any ideas you have for future releases. You can rate and comment on these changes in the MSDN code gallery download page or join us in the Bing Ads Developer Forumwhere we’ll be happy to answer your questions and listen to your feedback.

These downloads are refreshed each month to match the latest service definitions.