Visibility in PHP

By Josh Sherman
1 min read
development
php

Visibility of functions and properties is very important when you are attempting to lock down certain aspects of an object. In PHP there are three levels of visibility, public, private and protected. Let’s take a look at what each one means. Public Public is the easy one. It’s the default […]

The definition of “done”

By Josh Sherman
1 min read
developer etiquette

For me, “done” means that something I have been working on is to the point that I no longer have to work on it, indefinitely. Depending on the nature of the task it could also mean that it’s been shipped to production and again, no longer requires my efforts. I […]

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 […]