How To Extend PHP To Use a C/C++ AI Application
SCENARIO: I've used PHP extensively BUT am very new to extending it. However I've quickly got to get PHP 4.3.x
talking to a certain C/C++ application that I am building for AI routines. I've also checked out a lot of "Building Custom PHP Extensions" tutorials, even the manual at http://www.php.net/manual/en/zend.php and liked them much. HOWEVER they deviate from
what am looking for. Actually, what I see described @ http://www.zend.com/php/internals/exten ... iting1.php appears like she's building certain functionality into PHP (I guess that's only half of how one can extend PHP) rather than get PHP to use functionality from an external
program - much like interfacing it with MySQL or GD etc. I wish she was describing the latter method rather than the former.
QUESTION: How then do I interface PHP with the C/C++ program without duplicating the AI effort into the PHP loadable
module? Please advice
EXTENDING PHP FUNCTIONALITY
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
I don't see a need for creating an extension in your description at all if you don't want to integrate the routines into the extension. Instead you seem to need only set up calls to the executable via exec(), system(), and/or shell_exec()