Merge pull request #16 from henriquemoody/exceptions

Best use of exceptions
Create PHPT functional tests in "tests/functional"