当前位置:Gxlcms > PHP教程 > php自己写扩展内置函数报错了希望写过php扩展哥哥们来看些

php自己写扩展内置函数报错了希望写过php扩展哥哥们来看些

时间:2021-07-01 10:21:17 帮助过:8人阅读

php

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) 这个错误!!

人气教程排行