Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Document stubs #13677

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

Merged
kocsismate merged 10 commits into php:master from kocsismate:stub-docs
May 29, 2024
Merged

Document stubs #13677

kocsismate merged 10 commits into php:master from kocsismate:stub-docs
May 29, 2024

Conversation

Copy link
Member

@kocsismate kocsismate commented Mar 11, 2024
edited
Loading

I'm not a good writer, so feel free to suggest better wording/rephrase the text wherever needed :)

@kocsismate kocsismate added the Category: Documentation This is for documentation inside php-src, not on php.net label Mar 11, 2024
@kocsismate kocsismate force-pushed the stub-docs branch 3 times, most recently from c6c16d2 to 90b2a67 Compare March 11, 2024 22:22
Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I did read this in detail. There are some grammatical oddities, but I'm not sure code reviews are a good tool to fix those.

Please check the README on how to auto-format the files.

Thank you for providing some documentation on the frameless calls 🙂

Stubs
#################

Stub files are pieces of plain PHP code which only contain declarations without actually runnable code. A very basic stub
Copy link
Member

@iluuu1994 iluuu1994 Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should start out explaining what problem stubs solve exactly, along with maybe a simple example of a stub and a function implementation.

Copy link
Member Author

@kocsismate kocsismate Mar 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to come up with a better intro.. I also felt that the current one is not very good :D

compile-time. The feature internally works by adding the ``ZEND_ACC_COMPILE_TIME_EVAL`` function flag.

As of PHP 8.4, the concept of arity-based frameless functions was introduced. This is another optimization technique,
which results in faster internal function calls by eliminating unnecessary checks for the number of passed parameters
Copy link
Member

@iluuu1994 iluuu1994 Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly, it is about not creating a stack frame, but passing arguments to the function directly via the ICALL operands. Hence the name "frameless".

Copy link
Member Author

Thank you! I did read this in detail. There are some grammatical oddities, but I'm not sure code reviews are a good tool to fix those.

Feel free to point these out/suggest a better wording, and I'll try to fix them! I wouldn't want to provide docs which scares native speakers.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good just some nits

Copy link
Member

derickr commented Mar 18, 2024

I could do quite a bit to make this easier to read — but would it make sense if I spend an hour on it?

Copy link
Member Author

@derickr just a gentle ping: will you have capacity on improving the wording in the near future?

Copy link
Member Author

With the help of Derick, the documentation was revamped :)

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kocsismate kocsismate merged commit 0f64901 into php:master May 29, 2024
@kocsismate kocsismate deleted the stub-docs branch May 29, 2024 12:18
Copy link
Member Author

@iluuu1994 If you have followup suggestions, or anything comes to your mind which should be improved, feel free to reach out to me!

iluuu1994 reacted with thumbs up emoji

Copy link
Member Author

iluuu1994 reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@iluuu1994 iluuu1994 iluuu1994 left review comments

@Girgias Girgias Girgias approved these changes

Assignees
No one assigned
Labels
Category: Documentation This is for documentation inside php-src, not on php.net
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /