Examining the Code
First we shall create a COM object for the object we just installed and registered, as COM interop makes the .NET assembly look like COM objects we can use the same syntax as we use to create COM objects in PHP.
$MyObj = new COM ("phpclass.HealthRecord.patient");
We shall now set the lmp property to a valid date, which would be used to calculate edd.
$MyObj->lmp = "05/08/2002";
We shall now output the LMP property in human readable date format and shall also output the calculated EDD property to the browser.
echo "LMP : $MyObj->lmp";
echo "<br />EDD : $MyObj->edd";