3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = <<<EOF Some stuff before this notice which is not relevant. == Upgrade Notice == = 1.3.0 = When using Master Pro, 1.3.0 is the new minimal required version! When using Master Pro, 1.3.0 is the new minimal required version! When using Master Pro, 1.3.0 is the new minimal required version! 123123 = 1.1.0 = When using Master Pro, 1.1.0 is the new minimal required version! = 1.0.0 = No upgrade - just install :) [See changelog for all versions](https://plugins.svn.wordpress.org/master-pro/trunk/CHANGELOG.md). EOF; function parse_update_notice( string $content, string $new_version ) { $regexp = '~==\s*Upgrade Notice\s*==\s*.*?=+\s*(' . preg_quote( $new_version ) . ')\s*=+\s*(.*?)(?=^=+\s*\d+\.\d+\.\d+\s*=+|^\s*?$)~ms'; if ( preg_match( $regexp, $content, $matches ) ) { echo $matches[1], PHP_EOL; echo $matches[2], PHP_EOL; } } parse_update_notice($content, '1.3.0'); parse_update_notice($content, '1.1.0'); parse_update_notice($content, '1.0.0'); parse_update_notice($content, '0.1.0');
Output for 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
1.3.0 When using Master Pro, 1.3.0 is the new minimal required version! When using Master Pro, 1.3.0 is the new minimal required version! When using Master Pro, 1.3.0 is the new minimal required version! 1.1.0 When using Master Pro, 1.1.0 is the new minimal required version! 1.0.0 No upgrade - just install :)
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
107.02 ms | 407 KiB | 5 Q