added phpdocs; php5.4 syntax
added test files
default $id is NULL
updated version number
added docs