SoFlo PHP 2013-09 – September

The monthly SoFlo PHP meetup was moved at the last minute to LiveNinja‘s offices in Miami. Thanks to Ptah for jumping in at the last minute with the space. The topic was debugging in PHP. I had to leave before our keynote speaker could get started, but got some good tips from Adrien and Ptah. I’m moving my usual “to Google” list from Google docs to here. Some of this might get fleshed out later as a separate post.

PHP Debugging tools

Xdebug is installed as a PHP extension and will let you step through code, do breakpoints, and other debugger things. There is a Windows build, with a pretty cool wizard that will analyze the output of phpinfo to provide custom install instructions. There is also Zend PHP Debugger, part of the Zend server stack.

Charles Proxy was mentioned as a traffic inspection tool. Looks like it’s similar to Fiddler. It might be worth seeing if it can inspect the SSL payload without the private key (doubtful), I think probably Firebug on the client and Wireshark on the server are a more powerful combination.

Monolog is a centralized logging class which seems pretty cool. Instead of writing myextension_debugprint() and stuffing file_get_contents into it, this might be a more graceful solution.

PHP has added some new functions, error_handler and exception_handler which take a callable function and let you die a little more gracefully when you have some coding mistake. IMO trying anything which throws an exception is critical, but error_handler is nice since writting if ((array_key_exists()) && (isset()) get’s a bit stale.

Some popular IDEs to check out

  • Zend Studio – I got a license for this with my ZCE and should probably install it.
  • PHPStorm – well known and popular
  • Sublime Text – this is a lightweight editor, more like Notepad++ than a brutal IDE. Has an x64 Windows build. After installing and taking a quick look, Notepad++ and even Crimson Editor seem better.

Other stuff

Pimple is a dependency injection container which will instantiate objects on demand instead of all up front.

Postman is a Google Chrome extension which helps you craft HTTP post messages. This is really helpful if you’re doing REST, but also if you’re writing a site scraper.

Advertisements

About robertlabrie
DevOps Engineer at The Network Inc in metro Atlanta. Too many interests to list here, check out my posts, or look me up on LinkedIn

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: