Skip to content

Conversation

@jordikroon
Copy link
Contributor

@jordikroon jordikroon commented Dec 21, 2025

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

Add documentation for two new 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

Update opcache_is_script_cached documentation to clarify it checks in-memory cache and cross-reference the new file cache function.
Add version information for two new opcache functions:
- opcache_is_script_cached_in_file_cache (PHP 8.5.0+)
- opcache_jit_blacklist (PHP 8.4.0+)
- Reformat XML elements for better readability with consistent indentation
- Add missing returnvalues section with &return.void; entity
- Improve title element formatting for the basic example
- Standardize spacing in seealso section
- Fix trailing whitespace and comment indentation
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.

Markup issues

Comment on lines 42 to 44
<para>
&return.void;
</para>
Copy link
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
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
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
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
Contributor Author

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

@Girgias
Copy link
Member

Girgias commented Jan 18, 2026

@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.

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