Skip to content
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

Introduces PHP_VERSION_ID for faster checking #604

Merged
merged 2 commits into from
Dec 7, 2018

Conversation

stodorovic
Copy link

Since PHP 5.2.7, the PHPVERSIONID constant is available. Also, WP core has fallback for this constant in wp-includes/random_compat/random.php. So, it doesn't exist only in very old installations of WP on very old PHP versions. It's very rare case and I've added fallback for this case.

Example of usage:

if ( PHP_VERSION_ID >= 50300 ) {
    clearstatcache( true, $wp_cache_config_file );
}

@donnchawp donnchawp merged commit 22383f0 into Automattic:master Dec 7, 2018
@stodorovic stodorovic deleted the uses_php_version_id branch December 7, 2018 12:59
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.

2 participants