3v4l.org

run code in 300+ PHP versions simultaneously
<?php $md = <<<'MD' 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! = 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). MD; $versions = []; $currentVersion = ''; $ignore = true; foreach(explode("\n", $md) as $line) { if (str_starts_with($line, '== Upgrade Notice ==')) { $ignore = false; continue; } if (preg_match('/^= ([0-9.]+) =/', $line, $matches)) { $currentVersion = $matches[1]; continue; } if (true === $ignore || '' === $currentVersion) { continue; } $versions[$currentVersion][] = $line; } print_r($versions);
Output for 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14, 8.5.0
Array ( [1.3.0] => Array ( [0] => [1] => When using Master Pro, 1.3.0 is the new minimal required version! [2] => ) [1.1.0] => Array ( [0] => [1] => When using Master Pro, 1.1.0 is the new minimal required version! [2] => ) [1.0.0] => Array ( [0] => [1] => No upgrade - just install :) [2] => [3] => [See changelog for all versions](https://plugins.svn.wordpress.org/master-pro/trunk/CHANGELOG.md). ) )
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:
103.94 ms | 408 KiB | 5 Q