3v4l.org

run code in 300+ PHP versions simultaneously
<?php $minutesConverter = function($from,$to,$format='dynamic') { $periods = array('year' => 525600, 'month' => 43800, 'week' => 10080, 'day' => 1440, 'hour' => 60, 'minute' => 1); $output = array(); foreach ($periods as $period_name => $period) { $num_periods = floor($from / $period); if ($num_periods > 1) { $output[] = "$num_periods {$period_name}s"; } elseif ($num_periods > 0) { $output[] = "$num_periods {$period_name}"; } $from -= $num_periods * $period; } return implode(' : ', $output); }; echo $minutesConverter(131390, 0);
Output for git.master, git.master_jit, rfc.property-hooks
2 months : 4 weeks : 2 days : 9 hours : 50 minutes

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:
143.25 ms | 405 KiB | 5 Q