# Can't use php_error_docref in zend_API.c?

- Thread: https://externals.io/message/76503
- Original archive: https://news-web.php.net/php.internals/76503
- Started by Aaron Lewis on 2014-08-14T02:13:31+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

---

## #76503 — Aaron Lewis — 2014-08-14T02:13:31+00:00

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

Hi,

I'm trying to print error messages in zend, so I add a function in
zend_API.{h,c}

Then I got and error:
/Zend/zend_API.c:3226: undefined reference to `php_error_docref

So, what's the appropriate function to use?

-- 
Best Regards,
Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/
Finger Print:   9F67 391B B770 8FF6 99DC  D92D 87F6 2602 1371 4D33

---

## #76504 — Andrea Faulds — 2014-08-14T02:39:20+00:00

URL: https://externals.io/message/76503#76504 · In reply to: #76503

> I'm trying to print error messages in zend, so I add a function in
> zend_API.{h,c}
> 
> Then I got and error:
> /Zend/zend_API.c:3226: undefined reference to `php_error_docref
> 
> So, what's the appropriate function to use?

zend_error_docref doesn’t exist, I believe the convention is to use zend_error (of which php_error is an alias).

Also, you ought to consider going to IRC (I like irc://irc.efnet.org/#php.pecl myself) or somewhere with these sorts of small, quickly answerable questions to avoid spamming the list.

--
Andrea Faulds
http://ajf.me/
