How can PHP interact with a C # process in mono?

I am coding a web application in PHP and it has some components requiring high performance that I would like to rewrite in a compiled language. I know that maybe I could make it easier just by writing a C ++ extension for PHP, but I am a bit spoiled by managed languages ​​like C #, so I would like to avoid C ++ if possible.

If I wanted a PHP script to execute a function inside a running C # process (in mono), how could I do this? My first assumption is that PHP would open the socket for the C # process, do the work, and close the socket, but I think that would add extra overhead.

Is there named pipes something that can solve this problem? If so, do they work on windows (my development machine) and how to use them from C #?

If not, what other options do I have?

+5
source share
3 answers

Do you consider using the PHP.NET compiler, Phalanger ?

+9
+1

PECL , ( 2003 ); , , ...

- , php, .NET, COM .Net(Windows); , , , "mono", , , " ": - (

Every time I heard about a PHP extension using compiled langage, it used C (and sometimes C ++); I have never used C # /. NET / mono for this ...

... So you cannot find what you are looking for: - (

As you said, with several processes and the connection between them, you could do something ... But I'm not sure that such a good idea ...

(Compiling PHP on .NET seems possible, but - but it’s like the exact opposite of what you ask ^^)

0
source

All Articles