如何编写PHP函数 [英] how to write php function

查看:678
本文介绍了如何编写PHP函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想知道我怎么能在C编写PHP函数(如 strtoupper )。如果有任何教程,请把它放在这里

hi i want to know how i can write php function in c (like strtoupper). if is there any tutorial please put it here

感谢

推荐答案

要编写C函数,可以从PHP中使用,你必须编写扩展。

To write a function in C, that can be used from PHP, you'll have to write an extension.

有没有那么多的信息有关可用的,不幸的是...

There are not that many informations about that available, unfortunatly...

不过,通过我的书签搜索,下面是我找到的链接:

Still, searching through my bookmarks, here are the links I found :

  • Extension Writing Part I: Introduction to PHP and Zend
  • Extension Writing Part II: Parameters, Arrays, and ZVALs
  • Extension Writing Part II: Parameters, Arrays, and ZVALs [continued]
  • Extension Writing Part III: Resources
  • Wrapping C++ Classes in a PHP Extension

和,如果你是在学科真正感兴趣,并准备花点钱就可以了,你可以买这本书的扩展和嵌入PHP (<一个href=\"http://books.google.com/books?id=zMbGvK17%5FtYC&printsec=frontcover&dq=Extending+and+Embedding+PHP&ei=KqeOSoeML4bMM4aL3LAH#v=onepage&q=&f=false\"相对=nofollow>有些页面是作为对谷歌图书preVIEW 太)的;我见过几次,这是的阅读本书时,对这个问题感兴趣的(事实上,我已经买了它前一段时间,这是一个有趣的阅读)

And, if you are really interested by the subject, and ready to spend some money on it, you could buy the book Extending and Embedding PHP (some pages are available as preview on Google Books too) ; I've seen a couple of times that it was the book to read when interested on this subject (In fact, I've bought it some time ago, and it's an interesting read)

顺便说一句,那本书的作者也是前四文章的作者我挂; - )

BTW, the author of that book is also the author of the first four articles I linked to ;-)

这篇关于如何编写PHP函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆