return of an array

From: Date: Wed, 17 Nov 2004 03:53:16 +0000
Subject: return of an array
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1635@lists.php.net to get a copy of this message
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 :)

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