7月 302011
 

前面有篇文章(http://phpor.net/blog/post/883/)提到了PHP 的memcache模块的delete方法的问题,并且做了一些修改,但是,那篇文章也提到,那种修改办法也有很大的缺点,这里给出一种比较好一些的方式。

修改memcache_delete函数如下:

 

测试:

 

输出结果:
should no found:        no found
should ok:      OK
should connect error:   connect error
should key error:       Key in unvalidate
it can work without flag argument, that’s ok
====================================================

本次所学
1. 关于参数的传递,可以直接解析成内部类型,也可以直接使用zval类型
2. 关于引用传参这里做的不太对,且看后面的文章

 Posted by at 上午 6:18

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据