Juozas Kaziukenas has written up a new post (as a part of his participation in the WinPHP Challenge) about how he's combined C# code with PHP code in his development.
Actual PHP part is very easy to write, because only thing you need to do is to create COM object. However, making your dll’s visible by PHP is a bit tricky.
He points to this tutorial as a starting point and issues he had with ComVisible and some example code that finally got things working.