Sometimes while you are coding, you need some kind of a wrap for some primitive data type such as an integer, just to add some feature that is not available directly from that primitive data type, or just to give it some identity. A Date, Integer, or Dollar class is a handy - and inexpensive - encapsulation, easily copied, compared, or created when needed. For example managing Bytes and printing them can be something annoying, for example, when ever you need to print the number of Bytes in a file, you would like to check if it can be represented in KB, MB, or GB. So what I'm going to do here is to wrap the integer datatype into a Byte class, and override it's __toString function (one of the magic functions in PHP 5) so every time time I need to print it a simple print would do the issue. Our example here would be for a mailbox, every mailbox has a quota, I want to give it a starting quota, then increase it, so first I'm going to write the Test for it (Using simpletest ). &