kvn
programmer
Inline C in PHP
Прикольную штуку люди придумывают:
Inline::C in php ?
George Schlossnagle suggested supplying the possibility of adding the well known feature of the perl world: Inline:: C. Indeed, without reinventing inevitably the wheel. The purpose being to be able to use it in this way:
Inline_C would take the block of C code, adds to it the necessary information to make a module, after compilation the binary would be put in cache and loaded via dl ().
http://pear.php.net/weeklynews.php
интересно , что будет дальше...
Прикольную штуку люди придумывают:
Inline::C in php ?
George Schlossnagle suggested supplying the possibility of adding the well known feature of the perl world: Inline:: C. Indeed, without reinventing inevitably the wheel. The purpose being to be able to use it in this way:
PHP:
<?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);
?>
http://pear.php.net/weeklynews.php
интересно , что будет дальше...