fix overflowing length read on php, and the date test.  Add php test target