Easy question

php.internals

Oriol

23 years ago
Hello! How can I know if a user function exists? Must I use zend_hash_find()? How? Thank you, Oriol

Derick Rethans

23 years ago
Hi, On Thu, 19 Jun 2003, Oriol wrote:
> How can I know if a user function exists? Must I use zend_hash_find()? > How?
Yup, zend_hash_find on the function_table hash (check how function_exists (Zend/zend_builtin_functions.c) is implemented). regards, Derick
-- "Interpreting what the GPL actually means is a job best left to those that read the future by examining animal entrails." ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ International PHP Magazine http://php-mag.net/ -------------------------------------------------------------------------

Oriol

23 years ago
Thank you!! And... how could I know which PHP file is being executed and which line I'm on? Is there any simple way of getting it? Oriol ----- Original Message ----- From: "Derick Rethans" <derick@php.net> To: "Oriol" <omagrane@anthill.es> Cc: <internals@lists.php.net> Sent: Thursday, June 19, 2003 2:32 PM Subject: Re: [PHP-DEV] Easy question
> Hi, > > On Thu, 19 Jun 2003, Oriol wrote: > > > How can I know if a user function exists? Must I use
zend_hash_find()?

J Smith

23 years ago
Oriol wrote:
> > Thank you!! > And... how could I know which PHP file is being executed and which > line > I'm on? Is there any simple way of getting it? > > Oriol > >
Take a look at zend_error() in zend.c, where it says "Obtain relevant filename and lineno". J