3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_wp_version_compatible( $required ) { $wp_version = '6.4.1'; // Strip off any -alpha, -RC, -beta, -src suffixes. list( $version ) = explode( '-', $wp_version ); if ( is_string( $required ) && substr_count( $required, '.' ) > 1 && str_ends_with( $required, '.0' ) ) { error_log(__FUNCTION__ . '(): ' . /* translators: s: version string sent to function */ sprintf( '`%s` Not a valid WordPress version string.', $required ) ); $required = rtrim( $required, '.0' ); } return empty( $required ) || version_compare( $version, $required, '>=' ); } echo is_wp_version_compatible('6.4'); echo is_wp_version_compatible('3.0'); echo is_wp_version_compatible('3.0.0'); echo is_wp_version_compatible('6.4.1');
Output for git.master, git.master_jit, rfc.property-hooks
1111is_wp_version_compatible(): `3.0.0` Not a valid WordPress version string.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
50.25 ms | 405 KiB | 5 Q