3v4l.org

run code in 300+ PHP versions simultaneously
<?php $day1 = new DateTime( '2010-03-30' ); $day1->modify( '+1 month' ); $firstdaynextmonth=$day1->format( 'm' ); $firstday=$day1->format( 'd-m-Y' ); $day2 = new DateTime( '2010-03-30' ); $day2->modify( 'last day of next month' ); $seconddaynextmonth=$day2->format( 'm' ); $secondday=$day2->format( 'd-m-Y' ); echo "1st-".$firstday, "\n"; echo "2nd-".$secondday, "\n"; echo "1stnext month-".$firstdaynextmonth, "\n"; echo "2ndnext month-".$seconddaynextmonth, "\n"; //if($firstday > $secondday){ //echo $secondday; //} //else // echo $firstday; $result=($firstdaynextmonth == $seconddaynextmonth)?$firstday:$secondday; echo $result;

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.0110.01116.50
8.3.50.0080.00916.54
8.3.40.0080.00618.82
8.3.30.0140.00718.70
8.3.20.0090.00018.75
8.3.10.0080.00020.69
8.3.00.0060.00319.50
8.2.180.0120.00916.88
8.2.170.0000.01522.96
8.2.160.0070.00721.18
8.2.150.0120.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00020.02
8.2.110.0030.00720.61
8.2.100.0060.00618.03
8.2.90.0030.00619.28
8.2.80.0040.00417.97
8.2.70.0080.00017.88
8.2.60.0070.00319.91
8.2.50.0000.00818.22
8.2.40.0080.00020.67
8.2.30.0000.00719.28
8.2.20.0000.00817.93
8.2.10.0040.00417.81
8.2.00.0060.00617.93
8.1.280.0140.00725.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.66
8.1.230.0070.00419.19
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0060.00317.48
8.1.190.0030.00517.60
8.1.180.0040.00418.10
8.1.170.0050.00318.81
8.1.160.0000.00818.93
8.1.150.0000.00720.36
8.1.140.0040.00717.58
8.1.130.0070.00017.87
8.1.120.0040.00417.75
8.1.110.0040.00417.66
8.1.100.0040.00417.73
8.1.90.0040.00417.68
8.1.80.0080.00017.73
8.1.70.0000.00717.52
8.1.60.0000.00817.81
8.1.50.0020.00517.71
8.1.40.0090.00017.70
8.1.30.0040.00417.81
8.1.20.0080.00017.68
8.1.10.0050.00217.78
8.1.00.0050.00317.79
8.0.300.0000.00818.77
8.0.290.0050.00316.88
8.0.280.0040.00418.59
8.0.270.0050.00217.32
8.0.260.0000.00816.96
8.0.250.0000.00717.23
8.0.240.0000.01017.21
8.0.230.0040.00417.21
8.0.220.0000.00817.21
8.0.210.0000.00717.09
8.0.200.0060.00017.11
8.0.190.0050.00317.20
8.0.180.0040.00417.07
8.0.170.0040.00417.16
8.0.160.0070.00017.15
8.0.150.0030.00617.11
8.0.140.0060.00616.96
8.0.130.0030.00313.49
8.0.120.0030.00517.02
8.0.110.0040.00417.19
8.0.100.0050.00317.02
8.0.90.0000.00717.14
8.0.80.0090.00617.07
8.0.70.0040.00417.14
8.0.60.0040.00416.98
8.0.50.0040.00417.09
8.0.30.0160.00317.32
8.0.20.0120.00817.31
8.0.10.0040.00417.26
8.0.00.0120.00817.11
7.4.330.0050.00013.25
7.4.320.0060.00016.79
7.4.300.0000.00716.73
7.4.290.0000.00716.78
7.4.280.0040.00416.64
7.4.270.0090.00016.62
7.4.260.0030.00313.34
7.4.250.0030.00616.69
7.4.240.0000.00816.76
7.4.230.0000.00816.55
7.4.220.0090.00916.72
7.4.210.0090.00616.75
7.4.200.0030.00316.61
7.4.190.0000.00716.89
7.4.160.0100.01016.86
7.4.150.0030.01516.84
7.4.140.0090.01116.64
7.4.130.0100.00716.71
7.4.120.0100.00816.76
7.4.110.0130.00416.80
7.4.100.0100.00716.64
7.4.90.0100.01416.89
7.4.80.0160.01016.58
7.4.70.0100.01416.73
7.4.60.0090.00916.86
7.4.50.0000.00916.50
7.4.40.0080.00616.75
7.4.30.0070.01416.58
7.4.00.0130.00315.32
7.3.330.0030.00313.33
7.3.320.0000.00613.18
7.3.310.0000.00816.45
7.3.300.0070.00016.43
7.3.290.0110.00416.40
7.3.280.0100.00616.42
7.3.270.0070.01016.83
7.3.260.0050.01216.62
7.3.250.0070.01016.66
7.3.240.0070.01416.60
7.3.230.0060.01216.36
7.3.210.0090.00916.61
7.3.200.0070.01119.39
7.3.190.0140.00816.68
7.3.180.0120.00916.54
7.3.170.0070.01016.41
7.3.160.0070.00916.54
7.3.120.0030.01015.21
7.3.10.0060.00516.70
7.3.00.0060.00916.92
7.2.330.0060.01316.93
7.2.320.0110.00717.02
7.2.310.0170.00716.70
7.2.300.0070.01016.95
7.2.290.0030.01317.05
7.2.130.0060.00717.18
7.2.120.0060.00317.15
7.2.110.0120.00017.03
7.2.100.0110.00417.10
7.2.90.0040.00717.39
7.2.80.0030.00917.21
7.2.70.0030.00817.17
7.2.60.0060.00917.36
7.2.50.0040.00717.13
7.2.40.0090.00617.05
7.2.30.0060.01017.36
7.2.20.0030.00817.03
7.2.10.0080.00416.86
7.2.00.0100.00718.27
7.1.250.0040.00716.03
7.1.200.0120.00315.71
7.1.100.0000.01218.33
7.1.70.0070.00717.41
7.1.60.0140.01019.40
7.1.50.0090.00416.99
7.1.00.0000.07322.54
7.0.200.0070.00016.90
7.0.140.0030.07322.11
7.0.120.0070.07022.08
7.0.60.0070.04719.98
7.0.50.0070.08017.86
7.0.40.0070.04020.27
7.0.30.0430.07720.02
7.0.20.0230.03720.03
7.0.10.0100.07720.14
7.0.00.0100.04020.29
5.6.280.0100.06720.91
5.6.210.0100.08320.56
5.6.200.0170.07718.22
5.6.190.0100.07320.61
5.6.180.0400.04020.27
5.6.170.0300.04020.50
5.6.160.0070.04320.46
5.6.150.0030.05318.21
5.6.140.0030.04318.07
5.6.130.0000.04318.14
5.6.120.0030.08021.11
5.6.110.0100.08320.97
5.6.100.0270.07020.98
5.6.90.0200.06721.00
5.6.80.0070.07720.53
5.5.350.0070.07720.33
5.5.340.0000.05318.00
5.5.330.0130.07320.46
5.5.320.0270.06720.26
5.5.310.0230.04320.17
5.5.300.0130.04317.94
5.5.290.0130.07717.95
5.5.280.0100.08320.67
5.5.270.0130.07020.97
5.5.260.0100.05320.96
5.5.250.0030.05720.66
5.5.240.0170.07020.16
5.4.450.0070.05719.47
5.4.440.0070.04319.46
5.4.430.0070.08019.49
5.4.420.0070.06019.13
5.4.410.0030.04719.39
5.4.400.0070.03718.79
5.4.390.0070.04319.11
5.4.380.0070.04018.91
5.4.370.0030.05019.16
5.4.360.0030.04018.79
5.4.350.0100.05018.75
5.4.340.0030.07718.91
5.4.320.0030.05718.89
5.4.310.0030.04718.79
5.4.300.0070.05319.07
5.4.290.0170.06719.07
5.4.280.0130.04019.00
5.4.270.0130.03019.18
5.4.260.0070.04019.11
5.4.250.0100.06019.17
5.4.240.0030.04019.17
5.4.230.0100.07019.07
5.4.220.0130.06718.80
5.4.210.0200.06319.15
5.4.200.0070.04019.15
5.4.190.0030.07718.93
5.4.180.0030.08019.17
5.4.170.0070.06319.13
5.4.160.0030.06318.79
5.4.150.0000.07318.77
5.4.140.0000.06016.39
5.4.130.0100.07316.26
5.4.120.0130.05316.21
5.4.110.0000.07716.33
5.4.100.0100.06016.38
5.4.90.0000.07316.32
5.4.80.0030.05016.27
5.4.70.0070.07016.18
5.4.60.0100.05016.34
5.4.50.0000.05016.29
5.4.40.0030.04316.30
5.4.30.0070.03316.12
5.4.20.0000.04316.23
5.4.10.0030.03316.38
5.4.00.0000.03715.61
5.3.290.0030.05714.56
5.3.280.0030.06714.54
5.3.270.0100.06014.53
5.3.260.0000.04714.55
5.3.250.0100.07714.55
5.3.240.0070.05314.53
5.3.230.0030.06014.52
5.3.220.0030.04714.44
5.3.210.0070.06714.60
5.3.200.0070.07314.49
5.3.190.0070.04314.49
5.3.180.0070.07014.48
5.3.170.0030.04314.52
5.3.160.0070.05314.54
5.3.150.0030.08014.50
5.3.140.0000.04314.53
5.3.130.0000.04014.44
5.3.120.0000.04014.48
5.3.110.0000.04314.56
5.3.100.0030.03713.96
5.3.90.0030.03713.95
5.3.80.0170.02313.95
5.3.70.0030.03713.94
5.3.60.0030.04014.02
5.3.50.0070.03313.88
5.3.40.0000.04013.77
5.3.30.0000.04013.73
5.3.20.0070.03313.65
5.3.10.0100.02713.59
5.3.00.0030.03313.73
5.2.170.0070.02311.12
5.2.160.0000.03011.09
5.2.150.0000.03011.05
5.2.140.0030.02711.15
5.2.130.0000.03311.04
5.2.120.0000.03010.93
5.2.110.0070.02311.09
5.2.100.0070.02310.93
5.2.90.0000.03011.09
5.2.80.0100.02711.00
5.2.70.0000.03011.04
5.2.60.0000.03010.99
5.2.50.0030.02710.96
5.2.40.0030.02711.17
5.2.30.0000.03010.97
5.2.20.0030.03010.91
5.2.10.0000.03310.87
5.2.00.0130.02310.79
5.1.60.0000.02710.07
5.1.50.0030.02310.01
5.1.40.0000.02310.03
5.1.30.0000.02710.34
5.1.20.0030.02310.23
5.1.10.0030.02310.07
5.1.00.0030.02310.08
5.0.50.0000.0208.52
5.0.40.0000.0238.52
5.0.30.0070.0238.52
5.0.20.0000.0208.52
5.0.10.0030.0178.52
5.0.00.0000.0308.52
4.4.90.0030.0138.52
4.4.80.0030.0138.52
4.4.70.0000.0178.52
4.4.60.0070.0108.52
4.4.50.0000.0178.52
4.4.40.0130.0108.52
4.4.30.0030.0138.52
4.4.20.0030.0138.52
4.4.10.0030.0138.52
4.4.00.0000.0278.52
4.3.110.0000.0178.52
4.3.100.0000.0138.52
4.3.90.0000.0138.52
4.3.80.0030.0208.52
4.3.70.0030.0108.52
4.3.60.0000.0178.52
4.3.50.0000.0138.52
4.3.40.0000.0238.52
4.3.30.0000.0178.52
4.3.20.0000.0408.52
4.3.10.0030.0338.52
4.3.00.0030.0378.52

preferences:
53.67 ms | 401 KiB | 5 Q