What are the best options for connecting PHP apps to logic located in .NET libraries?
PHP, since v5.0, supports a DOTNET class that is supposed to let me invoke .NET logic from a PHP script. But it seems there are many problems - I've not been able to get it to work reliably, with arbitrary .NET classes. The doc is sort of slim and what is documented isn't really correct. The questions on the internets on this class are many, as are the bug reports on php.net.
I have been able to get PHP to connect with .NET via COM interop - but this requires that the .NET class be ComVisible. And as far as I know, because of the COM requirement, this works on Windows only.
I've heard of the Phalanger project but don't know many details. Does it work with arbitrary PHP scripts? Work on Linux? Does it have heavy perf or runtime implications?
Does it even make sense to do this, or is it one of those you-could-do-it-but-you-shouldn't sort of things?
EDIT: I'd like to hear about the general case: there is a wide variety of .NET class libraries available, and it would be nice to be able to take advantage of them from different environments, including PHP. Examples might be encryption, logging, data access, clients to HPC clusters. The particular immediate scenario is a ZIP library with AES encryption, available in .NET.