Skip to content

Add OPCache file cache and JIT blacklist functions - #5050

Merged
Girgias merged 2 commits into
php:masterfrom
jordikroon:docs/opcache-methods
Jan 19, 2026
Merged

Girgias merged 2 commits into
php:masterfrom
jordikroon:docs/opcache-methods

Conversation

@jordikroon

@jordikroon jordikroon commented Dec 21, 2025 •

Copy link
Copy Markdown
Member

Adds documentation for two OPCache functions:

  • opcache_is_script_cached_in_file_cache: checks if a script is cached in OPCache file cache
  • opcache_jit_blacklist: blacklists a function from being JIT compiled

The opcache_jit_blacklist function exists since 2024 but has never been documented. Additionally opcache_is_script_cached_in_file_cache is new since PHP 8.5.

References:
#4995
php/php-src#15559
php/php-src#16979

Doc tracker:
#3872
#4886

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Markup issues

Comment on lines +42 to +44
<para>
&return.void;
</para>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
<para>
&return.void;
</para>
<simpara>
&return.void;
</simpara>

Comment on lines +33 to +34
<para>
</para>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@arnaud-lb can you provide a description?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
<para>
</para>
<para>
The function to blacklist, represented as a first class callable. It is also possible to pass an anonymous function, in which case the anonymous function itself is blacklisted.
</para>

@Girgias
Girgias requested a review from arnaud-lb January 9, 2026 02:04
Comment on lines +33 to +34
<para>
</para>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
<para>
</para>
<para>
The function to blacklist, represented as a first class callable. It is also possible to pass an anonymous function, in which case the anonymous function itself is blacklisted.
</para>

@jordikroon
jordikroon requested a review from Girgias January 9, 2026 18:29
@jordikroon

Copy link
Copy Markdown
Member Author

Thank you @Girgias for the review. I also changed the para of other opcache functions to simpara for consistency.

@Girgias

Girgias commented Jan 18, 2026

Copy link
Copy Markdown
Member

@jordikroon can you please rebase this on the latest master, I created (and ran) some scripts to automatically convert the para tags across the opcache folder and automatically apply this to translations.

@jordikroon
jordikroon force-pushed the docs/opcache-methods branch from 470e481 to 9fe9c50 Compare January 18, 2026 21:39
@jordikroon
jordikroon force-pushed the docs/opcache-methods branch from 9fe9c50 to 5b2625d Compare January 18, 2026 21:40
@jordikroon

Copy link
Copy Markdown
Member Author

The PR has been rebased with the master @Girgias

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@Girgias
Girgias merged commit 3c36a56 into php:master Jan 19, 2026
2 checks passed
jordikroon added a commit to Narkunan/doc-en that referenced this pull request May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants