3v4l.org

run code in 300+ PHP versions simultaneously
<?php $format = 'Год: Y, Месяц: m, День: d'; $dates = [new DateTime('2020-10-20'), new DateTime('2000-02-05'), new DateTime('2000-02-02'), new DateTime('2000-05-01')]; usort($dates, fn($a, $b) => $a < $b ? -1: 1); foreach($dates as $date) { var_dump($date->format($format)); } var_dump('Min: ' . $dates[0]->format($format)); var_dump('Max: ' . $dates[count($dates) - 1]->format($format));
Output for git.master, git.master_jit, rfc.property-hooks
string(42) "Год: 2000, Месяц: 02, День: 02" string(42) "Год: 2000, Месяц: 02, День: 05" string(42) "Год: 2000, Месяц: 05, День: 01" string(42) "Год: 2020, Месяц: 10, День: 20" string(47) "Min: Год: 2000, Месяц: 02, День: 02" string(47) "Max: Год: 2020, Месяц: 10, День: 20"

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:
356.87 ms | 406 KiB | 5 Q