# Easy question

- Thread: https://externals.io/message/2418
- Original archive: https://news-web.php.net/php.internals/2418
- Started by Oriol on 2003-06-19T12:30:37+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #2418 — Oriol — 2003-06-19T12:30:37+00:00

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

Hello!
    How can I know if a user function exists? Must I use zend_hash_find()?
How?

    Thank you,

    Oriol

---

## #2420 — Derick Rethans — 2003-06-19T12:32:39+00:00

URL: https://externals.io/message/2418#2420 · In reply to: #2418

Hi,



>     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/

---

## #2422 — Oriol — 2003-06-19T13:23:37+00:00

URL: https://externals.io/message/2418#2422 · In reply to: #2420

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,
>
> 
>
> > […]
zend_hash_find()?
> > […]
>
> 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/

---

## #2427 — Jay Smith — 2003-06-19T14:48:03+00:00

URL: https://externals.io/message/2418#2427 · In reply to: #2422

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
