# Write a PHP function in C

- Thread: https://externals.io/message/11309
- Original archive: https://news-web.php.net/php.internals/11309
- Started by Christian-Kienle@losg.org on 2004-07-17T08:00:17+00:00
- Messages: 6
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #11309 — Christian-Kienle@losg.org — 2004-07-17T08:00:17+00:00

URL: https://externals.io/message/11309#11309

Hi,

sometimes I miss some functions in PHP. Most of the times I write this 
function in PHP and put this function(s) in a extra file and include this 
file in every project I have. 

Now I want to write those functions I have collected over years in C. 

1. for training
2. that i don't need to include my files where my functions are in every time.
3. for more performance? 

So - how can I do this? I have good C/C++ knowledges. I had a look at google, 
the PHP site and at the source code of PHP - but I found nothing. 

I am looking for a little HowTo/Tutorial how am I able to add new features to 
PHP - perhaps as a module (dont know if it is possible) or as a lib or as 
something else.. .:) 

Greets and TIA

Christian

---

## #11310 — Thomas Seifert — 2004-07-17T08:27:43+00:00

URL: https://externals.io/message/11309#11310 · In reply to: #11309

> I am looking for a little HowTo/Tutorial how am I able to add new features to 
> PHP - perhaps as a module (dont know if it is possible) or as a lib or as 
> something else.. .:) 

Every tried the php-documentation? ;)

http://www.php.net/manual/en/zend.php



thomas

---

## #11311 — Christian-Kienle@losg.org — 2004-07-17T08:31:55+00:00

URL: https://externals.io/message/11309#11311 · In reply to: #11310

> Every tried the php-documentation? ;)
Oooops :) my fault...

Thanks will work it througth


Christian

---

## #11312 — Wez Furlong — 2004-07-17T10:10:28+00:00

URL: https://externals.io/message/11309#11312 · In reply to: #11311

Be warned that parts of it are somewhat out of date, but the basics
are still applicable.

--Wez.

On Sat, 17 Jul 2004 10:31:55 +0200, Christian-Kienle@losg.org
<christian-kienle@losg.org> wrote:
> > […]
> Oooops :) my fault...
> 
> Thanks will work it througth

---

## #11314 — Michael Sims — 2004-07-17T15:22:03+00:00

URL: https://externals.io/message/11309#11314 · In reply to: #11309

Christian-Kienle@losg.org wrote:
> I am looking for a little HowTo/Tutorial how am I able to add new
> features to PHP - perhaps as a module (dont know if it is possible)
> or as a lib or as something else.. .:)

The last few chapters of George Schlossnagle's "Advanced PHP Programming"
are devoted to this topic...

http://www.amazon.com/exec/obidos/tg/detail/-/0672325616/

---

## #11343 — Hartmut Holzgraefe — 2004-07-19T11:20:46+00:00

URL: https://externals.io/message/11309#11343 · In reply to: #11309

Christian-Kienle@losg.org wrote:
> I am looking for a little HowTo/Tutorial how am I able to add new features to 
> PHP - perhaps as a module (dont know if it is possible) or as a lib or as 
> something else.. .:) 

The usual shameless plug: you may also want to have a look at PECL_Gen

Download => http://pecl.php.net/package/PECL_Gen

Documentation => http://cvs.php.net/co.php/pecl/PECL_Gen/manual.html?p=1

-- 
Hartmut Holzgraefe  <hartmut@php.net
