Re: return of an array

From: Date: Wed, 17 Nov 2004 04:06:41 +0000
Subject: Re: return of an array
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1636@lists.php.net to get a copy of this message
Hello, I found this too, Even with the documentation available at php.net for the zend API (http://www.php.net/manual/en/zend.php) I didn't find that useful. Their doesn't seem to be any desent documentation for do it. What I did find was a book at Amazon, "Building Custom PHP extensions" (http://www.amazon.com/exec/obidos/tg/detail/-/1411601882/ref=wl_it_dp/104-6578550-9671165?%5Fencoding=UTF8&coliid=I3S1F1WJP8ISP6&v=glance&colid=2JBEYS1FW6T6M) which I have read a little, and it seems pretty good. I do however need to get back into it, so I can create my extension. I do agree that the documentation for creating extensions is pretty poor for people who want to get started. Gordon. * Pierre Ancelot (eternityos@free.fr) wrote: > > > > Well, here i am, i coded an extension for php, all happy to have done it and > after having whined (i still whine about it :P) at the lack of documentation, > the source is NOT a documentation, a documentation is a nice tool so the > coder won't waste time looking through the source code... > > Well, anyhow, i might be the one that will write someday a documentation about > it, why not, this might help people. > > I don't write here to grrrr i write because of course i ran into a problem. > > i test my extension in cli with a simple php -f source.php > and it works very well, my extension is getting a bunch of files from http > servers in the same time by using threads and curl. > > i store everything in an array (did i say it lacks of documentation ?) which > is my return value. in cli, i do this: > > $ee = http_resquests($arguments); > > foreach($ee as $zz) > echo $zz."\n\n"; > > > and i get the contents of all the files i queryied. cool ! it works !!! > so i say, let's now try it loaded in php.ini > > it loads pretty well, error.log is happy with me, it's all ok. > > I request and it segfaults, after looking through, it appears it works very > well if i don't use the results in the php script. well, not exactly. $ee[1] > will work for example. but the lines i written above with a foreach drives me > to a segfaulting. > > Any idea ? > > > > (I'm bad about documentation but i'm pretty sure some coders given up on > extension writting just because of this... that's why i say it even though > the mailing list responds.) > > > > Thanks :) > > -- > PECL development discussion Mailing List (http://pecl.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > !DSPAM:419aca7c190571331920632! > -- Gordon Heydon <gordon@heydon.com.au>

« previous php.pecl.dev (#1636) next »