Re: Anyone seen an Inline::C implementation in php

From: Date: Wed, 18 Sep 2002 23:02:02 +0000
Subject: Re: Anyone seen an Inline::C implementation in php
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-9185@lists.php.net to get a copy of this message
Hello, On 09/18/2002 07:40 PM, George Schlossnagle wrote:
I'm considering implementing something like perl's Inline::C in php, but I want to avoid re-inventing the wheel. Anyone see anything thike this? Basically the goal would be able to write something like: <?pseudocode $function_def = <<<EOF php_function(times){
   int i,j;    return if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, &i,&j) = FAILURE)
RETURN_LONG(i*j); } EOF Inline_C($function_def); times(2,2); ?> Inline_C would take the block of code, wrap it in module glue, compile it, cache the binary somewhere, the call dl() on it. Anyone seen anything like this for php?
Sounds like a cool idea. I am not sure of how feasible that can be as you will need to access a bunch of build configuration information . It would be great if you could make it work under Windows. -- Regards, Manuel Lemos

« previous php.pear.dev (#9185) next »