12 Commits
Author SHA1 Message Date
Gina Peter BanyardandArnaud Le Blanc 2f7b01b86c Zend: always populate error pointer on failure of zend_is_callable() (#24435)
* Zend: always populate error pointer on failure

Most of the code base expects an error to be set if a char* is provided, as this used to be always the case. It no longer was the case since the partially supported callables were deprecates as the deprecation could be promoted to an exception in which case we skipped allocating a char*.

The simple fix, allocate a char* even in case of an exception so callers don't need to check if it still NULL. This fixes some error messages at the same time.

* tree: simplify error handling for failed zend_is_callable() calls

* docs: clarify docs for zend_is_callable()

---------

Co-authored-by: Arnaud Le Blanc <365207+arnaud-lb@users.noreply.github.com>
2026-10-20 17:59:02 +01:00
Rafia Minhaj 03108515a6 [skip ci] Fix typos in PHP internal documentation (#24334)
- writing-tests.rst: Infact -> In fact
- writing-tests.rst: isnt't -> isn't
- fci-fcc.rst: transfered -> transferred
2026-10-14 22:18:14 +02:00
Gina Peter BanyardandArnaud Le Blanc 4a41768eec docs: write docs for FCI/FCC structs and PHP callables API. (#23663)
Partly based on my own writing for the PHP Internals Book:

- https://github.com/phpinternalsbook/PHP-Internals-Book/pull/135
- https://github.com/phpinternalsbook/PHP-Internals-Book/pull/137
- https://github.com/phpinternalsbook/PHP-Internals-Book/pull/146

Co-authored-by: Arnaud Le Blanc <arnaud.lb@gmail.com>
2026-10-11 23:04:28 +01:00
Weilin Du 838a9c2ef8 Doc: Fix typo in zend_string.rst documentation 2026-07-12 00:11:52 +08:00
Weilin Du 6e20480250 Doc: Rename ZSTR_INIT to ZSTR_INIT_LITERAL in documentation
We don't have a macro named ZSTR_INIT. This should be ZSTR_INIT_LITERAL instead.
2026-07-11 17:06:34 +08:00
Weilin Du 44b11b75f2 ext/Intl: Fix IntlIterator::current() on invalid iterators (#22495)
IntlIterator::current() could expose an undefined zval when called before
theiterator is positioned, or after the iterator becomes invalid.

In these cases we directly returns the undefined zval and cause to a UNKNOWN:0
output in userland. Generally, a NULL output would be more proper.
2026-06-28 17:36:38 +08:00
Daniel Scherzer f97ff59742 zend_string docs: add missing apostrophe
[skip ci]
2026-05-27 15:15:22 -07:00
DanielEScherzer 3f03f7ed3d [RFC] Add support for attributes on compile-time constants
https://wiki.php.net/rfc/attributes-on-constants
2025-04-29 11:53:09 -07:00
DanielEScherzer 1a468b6efc Docs: add a page about zend_constant (GH-17072) 2025-02-14 12:49:57 +01:00
Máté Kocsis 53de62561d Fix some typos on the reference counting docs page 2024-04-30 22:16:45 +02:00
Ilija Tovilo a4dfa35f93 Fix docs typo 2024-02-18 20:31:54 +01:00
Ilija Tovilo 19d2b84788 Create book for docs
Closes GH-13338
2024-02-18 12:16:31 +01:00