beginner wants to add function

From: Date: Thu, 07 Sep 2000 15:51:56 +0000
Subject: beginner wants to add function
References: 1 2 3 4 5 6 7 8  Groups: php.dev 
Request: Send a blank email to php-dev+get-32568@lists.php.net to get a copy of this message
Hi, I am sorry for this beginner's question, but I tried several faqs and knowledge databases and did not find the answer. I want to add a function to PHP: index_in_array ( $value, $array) which is similar to in_array but returning the index where $value is found or -1 if not found. First I wanted to check how difficult is to add a function, so I created a "brother" of in_array, named in_array_brother. For this I modified the files below: php_array.h => I added PHP_FUNCTION(in_array_brother); basic_functions.c => I added PHP_FE(in_array_brother) array.c => I copied the in_array stuff to in_array_brother (including the comments) That's all. Then: "make clean", "configure (with proper options)", and "make". "make" returns an error many lines below the in_array_brother function. Please help. Thanks. Pedro.

« previous php.dev (#32568) next »