PHP

  • Server-side Analytics through Google

    ·

    Some of the products I build for the web don’t come with a website. But I can still use Google Analytics to track their usage. Thanks to a handy PHP library I found on GitHub, I now have the luxury of tracking the execution of server-side scripts in the same analytics dashboard I use to…

    Read More

  • Making Singletons Safe in PHP

    ·

    Last time, I argued in favor of the Singleton pattern in WordPress.  Singletons make sense in WordPress specifically for several reasons: They live in the global scope without using the already abused/overused [cci]global[/cci] keyword As a distributed application maintained by several hundred developers, they prevent problems that likely arise from others misusing your code But…

    Read More