3v4l.org

run code in 300+ PHP versions simultaneously
<?php $daysInMonth = array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); $errors = array(); for ($year = 1500; $year < 2000; $year++) { for ($month = 1; $month <= 12; $month++) { $monthErrors = 0; for ($day = 1; $day < $daysInMonth[$month]; $day++) { $baseString = sprintf("%4d-%02d-%02d 00:00:00", $year, $month, $day); $timestamp = strtotime($baseString); $roundTrip = date("Y-m-d H:i:s", $timestamp); if ($baseString !== $roundTrip) { $errors[] = "$baseString ($timestamp) $roundTrip"; $monthErrors++; if ($monthErrors > 10) { break 2; } } } } } $resolvedErrors = array(); if (count($errors) > 50) { $errorCount = count($errors); $delta = $errorCount / 50.0; $currentIndex = 0; do { $resolvedErrors[$currentIndex] = $errors[floor($currentIndex)]; $currentIndex += $delta; } while ($currentIndex < $errorCount); } else { $resolvedErrors = $errors; } echo implode("\n", $resolvedErrors);

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.3.60.0170.34818.78
8.3.50.0080.39521.21
8.3.40.0100.33218.88
8.3.30.0170.33019.17
8.3.20.0000.18520.28
8.3.10.0030.17222.09
8.3.00.0100.16622.49
8.2.180.0030.33418.54
8.2.170.0100.33022.96
8.2.160.0100.32219.33
8.2.150.0130.19424.18
8.2.140.0030.18724.66
8.2.130.0000.19626.16
8.2.120.0070.17119.66
8.2.110.0100.21321.18
8.2.100.0070.29918.28
8.2.90.0030.31817.97
8.2.80.0000.31318.98
8.2.70.0030.30617.88
8.2.60.0030.30317.84
8.2.50.0030.32117.80
8.2.40.0070.30219.72
8.2.30.0030.30418.26
8.2.20.0000.31717.94
8.2.10.0030.31717.95
8.2.00.0070.30917.97
8.1.280.0170.46425.92
8.1.270.0000.19718.94
8.1.260.0000.18426.35
8.1.250.0070.17828.09
8.1.240.0000.22623.92
8.1.230.0100.30022.75
8.1.220.0030.31917.74
8.1.210.0070.32918.85
8.1.200.0070.32717.48
8.1.190.0100.32517.35
8.1.180.0030.32918.10
8.1.170.0030.32317.72
8.1.160.0070.30622.20
8.1.150.0030.33018.83
8.1.140.0030.32617.76
8.1.130.0070.32517.65
8.1.120.0030.32217.66
8.1.110.0070.32517.56
8.1.100.0030.32617.58
8.1.90.0070.32517.72
8.1.80.0000.33617.57
8.1.70.0000.32417.56
8.1.60.0000.33217.72
8.1.50.0030.33017.71
8.1.40.0030.33117.61
8.1.30.0030.32417.66
8.1.20.0000.33217.78
8.1.10.0030.32817.61
8.1.00.0030.32817.68
8.0.300.0070.38519.73
8.0.290.0000.42517.00
8.0.280.0030.39918.44
8.0.270.0070.38017.39
8.0.260.0030.40217.03
8.0.250.0030.39917.04
8.0.240.0070.42817.20
8.0.230.0000.39617.20
8.0.220.0030.40917.11
8.0.210.0030.40117.13
8.0.200.0030.47717.18
8.0.190.0030.40817.14
8.0.180.0030.40717.09
8.0.170.0030.45617.02
8.0.160.0070.40817.17
8.0.150.0030.39917.06
8.0.140.0000.41617.09
8.0.130.0030.39013.50
8.0.120.0030.41616.96
8.0.110.0030.40917.00
8.0.100.0030.40016.98
8.0.90.0070.40717.10
8.0.80.0100.66517.02
8.0.70.0070.40917.09
8.0.60.0070.41216.99
8.0.50.0000.41417.05
8.0.30.0160.85517.30
8.0.20.0130.64617.40
8.0.10.0070.40117.29
8.0.00.0130.80217.00
7.4.330.0000.38615.00
7.4.320.0030.40516.75
7.4.300.0030.40416.73
7.4.290.0030.40816.79
7.4.280.0000.40816.64
7.4.270.0000.40816.73
7.4.260.0030.39816.72
7.4.250.0070.41016.65
7.4.240.0030.41116.74
7.4.230.0030.40916.50
7.4.220.0130.79616.71
7.4.210.0080.70816.72
7.4.200.0030.40516.73
7.4.190.0030.40516.59
7.4.160.0130.60216.50
7.4.150.0070.63717.40
7.4.140.0200.80817.86
7.4.130.0160.74716.66
7.4.120.0100.69316.64
7.4.110.0160.69416.84
7.4.100.0101.02716.85
7.4.90.0130.62616.70
7.4.80.0380.91319.39
7.4.70.0230.74116.67
7.4.60.0070.62216.76
7.4.50.0030.32016.66
7.4.40.0160.56222.77
7.4.30.0220.69316.83
7.4.00.0000.63014.90
7.3.330.0000.38313.31
7.3.320.0000.38013.46
7.3.310.0070.39316.43
7.3.300.0100.42216.48
7.3.290.0100.69916.44
7.3.280.0120.71016.45
7.3.270.0060.65217.40
7.3.260.0100.72916.68
7.3.250.0080.66216.67
7.3.240.0130.65816.75
7.3.230.0100.74416.74
7.3.210.0131.04316.81
7.3.200.0070.61819.39
7.3.190.0260.74616.61
7.3.180.0130.70216.39
7.3.170.0070.60316.74
7.3.160.0100.59716.46
7.3.120.0070.56114.78
7.2.330.0030.65616.80
7.2.320.0170.76416.72
7.2.310.0070.64916.66
7.2.300.0100.61416.73
7.2.290.0030.63716.57
7.2.60.0100.36317.09
7.2.00.0030.61319.74
7.1.200.0070.46516.05
7.1.100.0030.54418.19
7.1.70.0000.47417.34
7.1.60.0070.45319.82
7.1.50.0070.48217.29
7.1.00.0030.46022.45
7.0.200.0230.42015.04
7.0.140.0000.57322.09
7.0.80.0530.55719.92
7.0.70.0500.58019.95
7.0.60.0470.56319.78
7.0.50.0430.55020.31
7.0.40.0070.59320.05
7.0.30.0100.60320.04
7.0.20.0030.61020.01
7.0.10.0000.48020.09
7.0.00.0030.59719.99
5.6.280.0030.80320.88
5.6.230.0070.69320.54
5.6.220.0070.63320.59
5.6.210.0130.72720.68
5.6.200.0030.67721.07
5.6.190.0070.58321.17
5.6.180.0030.72021.08
5.6.170.0100.66721.05
5.6.160.0070.63021.08
5.6.150.0100.58021.11
5.6.140.0070.69321.09
5.6.130.0000.54321.07
5.6.120.0070.55721.14
5.6.110.0100.59721.13
5.6.100.0070.50321.16
5.6.90.0000.70721.00
5.6.80.0030.68320.43
5.6.70.0030.65720.50
5.6.60.0100.53020.33
5.6.50.0000.53020.47
5.6.40.0070.67020.44
5.6.30.0000.54020.43
5.6.20.0130.66320.38
5.6.10.0100.68020.42
5.6.00.0000.68320.46
5.5.370.0070.69720.36
5.5.360.0030.60020.35
5.5.350.0100.69020.45
5.5.340.0070.71320.88
5.5.330.0100.51020.93
5.5.320.0070.71020.88
5.5.310.0100.70020.84
5.5.300.0070.68020.93
5.5.290.0600.52320.91
5.5.280.0070.56020.78
5.5.270.0170.61720.92
5.5.260.0130.67720.90
5.5.250.0070.57320.71
5.5.240.0200.73020.23
5.5.230.0070.67020.19
5.5.220.0030.69720.31
5.5.210.0130.63020.30
5.5.200.0100.68320.25
5.5.190.0000.68320.23
5.5.180.0030.68720.27
5.5.160.0070.67320.13
5.5.150.0200.69320.23
5.5.140.0100.67020.22
5.5.130.0070.68720.19
5.5.120.0100.66020.16
5.5.110.0100.67020.21
5.5.100.0130.65020.13
5.5.90.0100.66019.98
5.5.80.0130.66720.11
5.5.70.0200.73020.15
5.5.60.0100.70720.06
5.5.50.0100.66320.09
5.5.40.0070.67320.15
5.5.30.0100.70320.06
5.5.20.0100.68720.15
5.5.10.0070.63720.05
5.5.00.0100.56720.06
5.4.450.0030.55019.11
5.4.440.0000.54719.40
5.4.430.0130.49719.43
5.4.420.0070.54319.35
5.4.410.0070.66019.29
5.4.400.0100.66719.03
5.4.390.0030.64018.95
5.4.380.0000.66719.25
5.4.370.0070.68318.94
5.4.360.0030.68019.20
5.4.350.0000.68319.03
5.4.340.0130.66319.03
5.4.320.0070.68018.98
5.4.310.0100.70719.12
5.4.300.0000.53318.98
5.4.290.0000.76719.11
5.4.280.0070.66019.04
5.4.270.0070.56318.78
5.4.260.0070.63719.23
5.4.250.0000.69719.09
5.4.240.0070.56018.78
5.4.230.0070.65319.13
5.4.220.0070.68719.14
5.4.210.0070.67319.05
5.4.200.0070.64319.02
5.4.190.0030.59718.77
5.4.180.0100.69718.93
5.4.170.0030.68018.80
5.4.160.0100.63318.76
5.4.150.0000.55019.12
5.4.140.0070.58716.34
5.4.130.0030.62716.38
5.4.120.0030.65316.33
5.4.110.0100.62316.39
5.4.100.0070.71316.29
5.4.90.0000.59316.26
5.4.80.0100.64316.29
5.4.70.0000.71716.35
5.4.60.0030.74016.38
5.4.50.0070.71016.29
5.4.40.0100.79316.40
5.4.30.0100.75016.24
5.4.20.0070.70716.17
5.4.10.0030.73016.29
5.4.00.0170.79015.79
5.3.290.0070.76014.67
5.3.280.0070.82714.46
5.3.270.0030.82714.61
5.3.260.0000.62314.58
5.3.250.0070.68714.46
5.3.240.0100.66714.60
5.3.230.0070.79714.47
5.3.220.0100.83014.42
5.3.210.0070.70314.44
5.3.200.0000.63714.57
5.3.190.0070.61014.53
5.3.180.0000.68714.55
5.3.170.0000.64314.43
5.3.160.0070.67014.43
5.3.150.0030.83314.55
5.3.140.0030.64714.57
5.3.130.0000.78714.50
5.3.120.0070.81314.54
5.3.110.0030.65314.57
5.3.100.0030.80714.01
5.3.90.0000.82714.04
5.3.80.0030.69014.04
5.3.70.0070.83013.89
5.3.60.0170.83714.00
5.3.50.0030.79713.95
5.3.40.0030.65313.82
5.3.30.0070.68313.69
5.3.20.0070.79313.68
5.3.10.0100.81713.66
5.3.00.0070.83013.59
5.2.170.0030.85711.14
5.2.160.0070.80311.02
5.2.150.0070.80310.95
5.2.140.0070.76711.20
5.2.130.0000.69011.06
5.2.120.0030.82711.11
5.2.110.0070.79711.15
5.2.100.0130.80711.16
5.2.90.0070.78710.98
5.2.80.0570.840245.41
5.2.70.0870.800245.49
5.2.60.0070.76311.09
5.2.50.0030.17311.54
5.2.40.0000.22711.53
5.2.30.0100.23711.56
5.2.20.0000.25711.39
5.2.10.0000.25711.38
5.2.00.0030.22711.37
5.1.60.0100.16011.25
5.1.50.0030.25311.19
5.1.40.0030.21711.20
5.1.30.0070.18311.55
5.1.20.0070.22011.49
5.1.10.0070.20311.32
5.1.00.0030.19711.39
5.0.50.2570.63010.79
5.0.40.2900.61710.79
5.0.30.3070.60010.79
5.0.20.2200.51310.79
5.0.10.2170.51310.79
5.0.00.2170.47310.79
4.4.90.3230.56710.79
4.4.80.2400.57010.79
4.4.70.2230.57010.79
4.4.60.2670.53010.79
4.4.50.2270.63310.79
4.4.40.2430.63310.79
4.4.30.2830.51310.79
4.4.20.2830.56310.79
4.4.10.2670.57310.79
4.4.00.2870.56310.79
4.3.110.3200.61310.79
4.3.100.2330.44010.79
4.3.90.2300.53010.79
4.3.80.2370.67010.79
4.3.70.2630.57310.79
4.3.60.1900.58010.79
4.3.50.2170.56010.79
4.3.40.2730.44710.79
4.3.30.2230.40010.79
4.3.20.2030.52010.79
4.3.10.2730.55010.79
4.3.00.2070.46710.79

preferences:
50.52 ms | 401 KiB | 5 Q