Skip to content

Expand/improve docs (https://php.github.io/php-src/) #15954

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DanielEScherzer opened this issue Sep 19, 2024 · 3 comments
Open

Expand/improve docs (https://php.github.io/php-src/) #15954

DanielEScherzer opened this issue Sep 19, 2024 · 3 comments
Labels
Category: Documentation This is for documentation inside php-src, not on php.net Feature Status: Needs Triage

Comments

@DanielEScherzer
Copy link
Member

Description

Having recently started contributing to PHP, I have found that I frequently needed to look through a bunch of different source files to figure out how different macros/types/patterns are used. I propose expanding https://php.github.io/php-src/ to better document these, to make things easier for new (and hopefully also existing?) contributors.

I'm happy to work on writing the documentation if it would be accepted, and some initial points that I suggest documenting are

  • parameter parsing and function declaration (lots of zend_API.h stuff)
  • the compatibility macros/debug tools/compiler hints (zend_portability.h)
  • data structures other than zval and zend_string, like class entries, properties, constants, and methods (zend_compile.h)
  • globals and the interaction with thread safety (zend_globals.h, zend_globals_macros.h)
  • arrays/HashTable (zend_types.h, zend_hash.h)

And there are probably a whole bunch of other areas that I just haven't run into

@iluuu1994
Copy link
Member

In case you haven't seen it, there are quite a few resources listed in the CONTRIBUTING guide:
https://github.com/php/php-src/blob/master/CONTRIBUTING.md#technical-resources

Nonetheless, expanding the documentation is always appreciated! I don't think the documentation should become an exhaustive reference, but it absolutely makes sense to explain each programming concept so that developers can learn to look up and understand the code easier.

@DanielEScherzer
Copy link
Member Author

I found https://www.phpinternalsbook.com/ really helpful, and understand it doesn't need to be exhaustive, but since https://php.github.io/php-src/ says that the documentation is a work in progress, I assumed it would be helpful to do some of that work

@iluuu1994
Copy link
Member

@DanielEScherzer Absolutely. I was just trying to clarify this beforehand, to avoid wasting your time. But yes, we absolutely would appreciate work on documentation. Newcomers are actually perfect candidates, because they have a much better notion of what is obvious/intuitive and what isn't.

DanielEScherzer added a commit to DanielEScherzer/php-src that referenced this issue Dec 6, 2024
DanielEScherzer added a commit to DanielEScherzer/php-src that referenced this issue Mar 20, 2025
@DanielEScherzer DanielEScherzer added the Category: Documentation This is for documentation inside php-src, not on php.net label Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Documentation This is for documentation inside php-src, not on php.net Feature Status: Needs Triage
Projects
None yet
Development

No branches or pull requests

2 participants