It can be done in two ways...
Writing PHP AS PHP... For this there are several extensions, like
PHP Tools for Visual Studio extension[
^] (not free, but you may search for one for free too)
Or writing .NET application using PHP... For this there is
Phalanger[
^] (not free, but open sourced)
So actually all you have to do is some search of the web...