Home > Backend Development > PHP Tutorial > php 自己写扩展 内置函数 报错了 希望写过php扩展哥哥们来看些

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

WBOY
Release: 2016-06-02 11:33:03
Original
928 people have browsed it

php

PHP_FUNCTION(ccvita_string)
{
int *a;
int argc = ZEND_NUM_ARGS();
int *result;

<code>if (zend_parse_parameters(argc TSRMLS_CC, "a", &a) == FAILURE)     return;int i=0;int j;int t;for(i=0;ia[j+1])        {            t=a[j];            a[j]=a[j+1];            a[j+1]=t;        }    }}   RETURN_RESOURCE(a); </code>
Copy after login

}

./configure --with-php-config=/usr/local/php/bin/php-config 没问题
make 也没有问题

我想应该就 这段代码出问题 求大神看看

这是我自己写的 冒泡排序 想变成内置函数

php 调用的时候 报resource(-1217317404) of type (Unknown) 这个错误!!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template