# Getting Script Name and Line Number From Extension

- Thread: https://externals.io/message/4433
- Original archive: https://news-web.php.net/php.internals/4433
- Started by Bruce Bailey on 2003-09-08T18:04:22+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #4433 — Bruce Bailey — 2003-09-08T18:04:22+00:00

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

Hi

I would like to access the PHP script name and line number from within my C 
extension.  Is there a function that I can call that will give me this 
information?  I know I can call 'zend_error', but that really doesn't do 
what I want.

Thanks in advance,

Bruce

_________________________________________________________________
Fast, faster, fastest: Upgrade to Cable or DSL today!   
https://broadband.msn.com

---

## #4434 — Jay Smith — 2003-09-08T19:25:56+00:00

URL: https://externals.io/message/4433#4434 · In reply to: #4433

Bruce Bailey wrote:

> Hi
> 
> I would like to access the PHP script name and line number from within my
> C extension.  Is there a function that I can call that will give me this
> information?  I know I can call 'zend_error', but that really doesn't do
> what I want.
> 
> Thanks in advance,
> 
> Bruce
> 

Try zend_get_(compiled|executed)_filename(TSRMLS_C) and
zend_get_(compiled|executed)_lineno(TSRMLS_C).

J
