3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ 0, 1, 2, 7, 8, 9, 28, 29, 30, ]; foreach ($tests as $days) { echo "\n$days: " . ( implode( ' and ', [ ...(fn($w) => $w ? ["$w week" . ($w === 1 ? '' : 's')] : [])(intdiv($days, 7)), ...(fn($d) => $d ? ["$d day" . ($d === 1 ? '' : 's')] : [])($days % 7) ] ) ?: '0 days' ); }
Output for rfc.property-hooks, git.master_jit, git.master
0: 0 days 1: 1 day 2: 2 days 7: 1 week 8: 1 week and 1 day 9: 1 week and 2 days 28: 4 weeks 29: 4 weeks and 1 day 30: 4 weeks and 2 days

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:
47.84 ms | 1003 KiB | 4 Q