Simple PHP i18n internationalization and localization class

By Josh Sherman
3 min read
development
php

As sites and system grow and scale, the need for internationalization and localization (i18n and L10n respectively) of content becomes a necessary task. There’s not much to it on the surface, you need to be able to serve up the same content in different languages. This includes abstracting out words […]

Stop making it so hard for us to share your content

By Josh Sherman
1 min read
blogging
writing

Hey you! Yes, you. You with that blog over there. The one without any sharing widgets whatsoever. Do you really think your content is so fucking special that people are going to go out of their way to copy and paste the link to share it? You expect us to […]

Debugging Invalid XML in PHP

By Josh Sherman
1 min read
development
php

SimpleXML with all of it’s faults is still a great way to interact with XML. Most of it’s shortcomings are related to debugging and how it handles invalid XML is no exception. Let’s take a look at what happens when we load an invalid XML string: $xml = " <?xml […]

Writing unit tests for legacy code

By Josh Sherman
2 min read
development
tdd

I think one of my biggest gripes with adopting that TDD life is that I feel I’m in the minority with my friends even though the concept appears to be quite mainstream these days. One of the common pushbacks I receive is that it’s hard to write unit tests for […]

Upgrade from PHP 5.3 to PHP 5.6 on Ubuntu 12.04 LTS

By Josh Sherman
1 min read
development
php
linux
ubuntu

Last week I posted a call to action to help sway Ondřej Surý into continuing to support Ubuntu 12.04 LTS with his amazing PPA for the latest and greatest PHP versions. Ondřej was kind enough to take the time to backport the PPA and without ado, here’s how to get […]