3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dates_array = ['20241203', '20240115', '20240116', '20240228', '20240229', '20240301']; foreach ($dates_array as $date) { $datetimes[] = new DateTime($date); } foreach ($datetimes as $key=>$date) { $dateStr = $date->format('j'); //check if there's another entry after this one if (isset($datetimes[$key+1])) { //check the if following entry is in the same month and year as this one if ($datetimes[$key+1]->format("ym") == $date->format("ym")) { $dateStr .= ","; } else { $dateStr .= " ".$date->format("F")." & "; } } else { $dateStr .= " ".$date->format("F"); } $date_array[]= $dateStr; } $date_string = join( ' ', $date_array ) ; echo $date_string;

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.20.0090.00720.24
8.5.10.0120.00716.88
8.5.00.0130.00820.15
8.4.170.0050.00621.95
8.4.160.0120.00923.09
8.4.150.0020.00014.05
8.4.140.0110.01117.61
8.4.130.0120.00817.95
8.4.120.0060.00220.77
8.4.110.0140.00622.25
8.4.100.0060.00319.10
8.4.90.0140.00620.50
8.4.80.0140.00518.89
8.4.70.0160.00818.21
8.4.60.0160.00719.00
8.4.50.0070.00920.51
8.4.40.0130.01017.74
8.4.30.0090.01218.81
8.4.20.0040.01519.78
8.4.10.0160.00319.28
8.3.290.0110.01020.83
8.3.280.0110.01018.66
8.3.270.0090.01016.58
8.3.260.0120.00816.81
8.3.250.0100.00918.73
8.3.240.0060.00316.64
8.3.230.0040.00416.57
8.3.220.0130.00318.91
8.3.210.0060.01016.74
8.3.200.0070.00116.91
8.3.190.0130.00517.26
8.3.180.0090.01117.30
8.3.170.0090.00620.64
8.3.160.0090.00918.41
8.3.150.0180.00017.13
8.3.140.0060.01318.68
8.3.130.0060.00318.64
8.3.120.0050.00520.82
8.3.110.0090.00020.94
8.3.100.0040.00424.06
8.3.90.0040.00426.77
8.3.80.0070.00717.97
8.3.70.0110.01118.55
8.3.60.0120.00316.91
8.3.50.0040.01516.75
8.3.40.0090.00621.82
8.3.30.0090.00620.27
8.3.20.0100.01023.68
8.3.10.0060.01323.61
8.3.00.0060.01320.54
8.2.300.0130.00620.38
8.2.290.0110.00820.38
8.2.280.0130.00618.62
8.2.270.0120.00618.50
8.2.260.0080.00016.72
8.2.250.0050.00218.46
8.2.240.0060.01017.08
8.2.230.0090.00022.58
8.2.220.0050.00337.54
8.2.210.0030.00726.77
8.2.200.0030.00618.88
8.2.190.0030.01016.63
8.2.180.0040.01118.18
8.2.170.0110.00422.96
8.2.160.0030.01022.96
8.2.150.0110.00720.95
8.2.140.0090.00922.20
8.2.130.0110.00722.25
8.2.120.0140.00321.08
8.2.110.0030.01021.25
8.2.100.0120.00920.75
8.2.90.0110.00420.82
8.2.80.0110.00421.18
8.2.70.0140.00020.58
8.2.60.0150.00620.57
8.2.50.0100.01021.05
8.2.40.0080.00820.71
8.2.30.0140.00720.71
8.2.20.0130.00720.75
8.2.10.0100.01020.69
8.2.00.0060.01320.51
8.1.340.0130.00617.96
8.1.330.0120.00821.73
8.1.320.0130.00518.05
8.1.310.0030.00616.60
8.1.300.0040.00718.31
8.1.290.0000.01030.84
8.1.280.0110.00725.92
8.1.270.0130.00723.91
8.1.260.0100.01023.81
8.1.250.0130.00723.83
8.1.240.0080.00820.52
8.1.230.0140.00320.42
8.1.220.0070.01020.77
8.1.210.0130.00620.32
8.1.200.0060.00920.59
8.1.190.0070.00720.50
8.1.180.0150.00020.42
8.1.170.0070.00720.58
8.1.160.0070.01020.52
8.1.150.0080.00820.35
8.1.140.0130.00320.38
8.1.130.0100.00620.56
8.1.120.0040.01220.48
8.1.110.0170.00020.46
8.1.100.0120.00320.53
8.1.90.0130.00320.46
8.1.80.0070.00721.60
8.1.70.0110.00420.59
8.1.60.0090.00620.54
8.1.50.0090.00620.63
8.1.40.0040.01220.63
8.1.30.0140.00020.68
8.1.20.0110.00321.88
8.1.10.0120.00320.55
8.1.00.0090.00620.32

preferences:
89.84 ms | 403 KiB | 5 Q