3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 1; $i <= 60; ++$i) { $result = []; $years = intdiv($i, 12); if ($years) { $result[] = $years . ' year' . ($years !== 1 ? 's' : ''); } $months = $i % 12; if ($months) { $result[] = $months . ' month' . ($months !== 1 ? 's' : ''); } echo implode(', ', $result) . "\n"; }
Output for 8.0.1 - 8.0.30, 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 - 8.5.1
1 month 2 months 3 months 4 months 5 months 6 months 7 months 8 months 9 months 10 months 11 months 1 year 1 year, 1 month 1 year, 2 months 1 year, 3 months 1 year, 4 months 1 year, 5 months 1 year, 6 months 1 year, 7 months 1 year, 8 months 1 year, 9 months 1 year, 10 months 1 year, 11 months 2 years 2 years, 1 month 2 years, 2 months 2 years, 3 months 2 years, 4 months 2 years, 5 months 2 years, 6 months 2 years, 7 months 2 years, 8 months 2 years, 9 months 2 years, 10 months 2 years, 11 months 3 years 3 years, 1 month 3 years, 2 months 3 years, 3 months 3 years, 4 months 3 years, 5 months 3 years, 6 months 3 years, 7 months 3 years, 8 months 3 years, 9 months 3 years, 10 months 3 years, 11 months 4 years 4 years, 1 month 4 years, 2 months 4 years, 3 months 4 years, 4 months 4 years, 5 months 4 years, 6 months 4 years, 7 months 4 years, 8 months 4 years, 9 months 4 years, 10 months 4 years, 11 months 5 years
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.
Output for 8.3.28
/bin/php-8.3.28: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.3.28)
Process exited with code 1.

preferences:
109.87 ms | 408 KiB | 5 Q