PHP_FUNCTION(ccvita_string)
{
int *a;
int argc = ZEND_NUM_ARGS();
int *result;
if (zend_parse_parameters(argc TSRMLS_CC, "a", &a) == FAILURE)
return;
int i=0;
int j;
int t;
for(i=0;i<10;i++)
{
for(j=0;j<10-i-1;j++)
{
if(a[j]>a[j+1])
{
t=a[j];
a[j]=a[j+1];
a[j+1]=t;
}
}
}
RETURN_RESOURCE(a);
}
./configure --with-php-config=/usr/local/php/bin/php-config 没问题
make 也没有问题
我想应该就 这段代码出问题 求大神看看
这是我自己写的 冒泡排序 想变成内置函数
php 调用的时候 报resource(-1217317404) of type (Unknown) 这个错误!!