Fix PHP5.3 compatibility #1
A start with tests
Finished the tests