3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ "1 Oct 2016", "2 Oct 2016", "3 Oct 2016", "4 Oct 2016", "5 Oct 2016", ]; $b = [ "29 Sep 2016", "30 Sep 2016", "1 Oct 2016", "2 Oct 2016", "3 Oct 2016", ]; $result = array_unique(array_merge($a, $b)); array_multisort(array_map('strtotime', $result), $result); var_export($result);
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
array ( 0 => '29 Sep 2016', 1 => '30 Sep 2016', 2 => '1 Oct 2016', 3 => '2 Oct 2016', 4 => '3 Oct 2016', 5 => '4 Oct 2016', 6 => '5 Oct 2016', )

preferences:
53.83 ms | 402 KiB | 62 Q