MS was nice enough to grant several members of the PHP community (including me) some MSDN licenses which include the "beefed up" versions of Visual Studio which have some additional tools including testing and code coverage.
So this evening I managed to get PHPTrunning my tests (they're just basic .phpt tests but run-tests is..well flakey is a nice description some days) for my winapi php extension wrapped inside a "generic test" for Visual Studio. It involved writing a semi-clever reporter to output test data in a way that visual studio liked, just fun with xml, getting the command line right for calling the tests, and telling visual studio what dlls I wanted to do code coverage on and making sure the /Profile switch got sent to the linker.
So what did all this accomplish? I now can run my phpt tests through visual studio and collect code coverage on what they're testing. Like GCOV, only for windows ;) Nice thing is I can also save xml files with the code coverage data. Tackling this for more of the php source might be a fun project... Makes the mind spin about getting a version of this working so gcov can have windows results too. Here's my pretty screenshot with coverage highlighting turned on (warning, the thing is huge).