3v4l.org

run code in 300+ PHP versions simultaneously
<?php $day1 = new DateTime( '2010-01-30' ); $day1->modify( '+1 month' ); $firstdaynextmonth=$day1->format( 'm' ); $firstday=$day1->format( 'd-m-Y' ); $day2 = new DateTime( '2010-01-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=($firstday > $secondday)?$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.40.0130.01018.77
8.3.30.0070.00718.84
8.3.20.0040.00418.90
8.3.10.0080.00020.57
8.3.00.0030.00617.75
8.2.170.0090.00622.96
8.2.160.0070.00722.26
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00719.78
8.2.110.0080.00321.07
8.2.100.0120.00017.63
8.2.90.0060.00319.30
8.2.80.0030.00517.90
8.2.70.0050.00517.88
8.2.60.0030.00518.16
8.2.50.0040.00418.07
8.2.40.0030.00518.28
8.2.30.0000.00718.07
8.2.20.0040.00417.93
8.2.10.0050.00318.04
8.2.00.0000.00817.93
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00022.70
8.1.230.0120.00021.03
8.1.220.0040.00417.74
8.1.210.0080.00018.91
8.1.200.0000.00917.48
8.1.190.0040.00417.53
8.1.180.0030.00518.10
8.1.170.0000.00819.04
8.1.160.0040.00419.03
8.1.150.0040.00418.82
8.1.140.0040.00417.66
8.1.130.0070.00017.95
8.1.120.0040.00417.70
8.1.110.0050.00217.61
8.1.100.0050.00217.70
8.1.90.0000.00717.64
8.1.80.0080.00017.76
8.1.70.0000.00817.67
8.1.60.0030.00617.71
8.1.50.0030.00617.68
8.1.40.0040.00417.78
8.1.30.0040.00417.88
8.1.20.0060.00317.85
8.1.10.0020.00517.70
8.1.00.0000.00817.75
8.0.300.0040.00419.98
8.0.290.0040.00417.00
8.0.280.0030.00318.57
8.0.270.0030.00317.46
8.0.260.0030.00317.09
8.0.250.0000.00717.12
8.0.240.0070.00017.20
8.0.230.0000.00717.22
8.0.220.0000.00717.04
8.0.210.0000.00817.15
8.0.200.0030.00317.11
8.0.190.0040.00417.12
8.0.180.0040.00417.17
8.0.170.0000.00917.05
8.0.160.0000.00717.03
8.0.150.0000.00817.14
8.0.140.0020.00817.16
8.0.130.0030.00313.57
8.0.120.0000.00717.13
8.0.110.0040.00416.98
8.0.100.0040.00417.05
8.0.90.0070.00017.04
8.0.80.0160.00017.16
8.0.70.0000.00717.02
8.0.60.0050.00217.20
8.0.50.0000.00717.18
8.0.30.0110.00817.34
8.0.20.0050.01617.37
8.0.10.0050.00217.22
8.0.00.0090.01217.14
7.4.330.0030.00313.13
7.4.320.0040.00416.77
7.4.300.0000.00616.64
7.4.290.0000.00716.71
7.4.280.0060.00316.72
7.4.270.0030.00316.87
7.4.260.0000.00713.42
7.4.250.0040.00416.62
7.4.240.0000.00716.78
7.4.230.0070.00016.87
7.4.220.0120.00616.57
7.4.210.0080.00916.76
7.4.200.0040.00416.79
7.4.190.0000.00716.80
7.4.160.0130.01016.89
7.4.150.0100.01016.82
7.4.140.0160.00516.70
7.4.130.0100.00816.75
7.4.120.0100.00716.73
7.4.110.0180.00316.93
7.4.100.0060.01216.94
7.4.90.0030.01416.67
7.4.80.0110.01116.68
7.4.70.0080.00816.44
7.4.60.0090.00916.75
7.4.50.0060.00316.69
7.4.40.0070.00716.86
7.4.30.0030.01316.71
7.4.00.0120.00615.07
7.3.330.0000.00613.33
7.3.320.0000.00513.30
7.3.310.0040.00416.28
7.3.300.0000.00716.32
7.3.290.0070.00716.41
7.3.280.0080.00816.42
7.3.270.0120.00816.60
7.3.260.0080.00916.50
7.3.250.0080.01216.69
7.3.240.0070.01016.73
7.3.230.0110.01116.54
7.3.210.0130.00316.84
7.3.200.0140.00919.39
7.3.190.0230.00016.50
7.3.180.0080.01516.68
7.3.170.0160.00016.64
7.3.160.0000.01816.66
7.3.120.0050.01215.22
7.3.110.0140.00415.13
7.3.100.0030.01015.21
7.3.90.0140.00315.02
7.3.80.0070.00314.77
7.3.70.0060.00315.03
7.3.60.0070.00715.06
7.3.50.0000.00914.70
7.3.40.0100.00314.82
7.3.30.0030.01015.11
7.3.20.0090.00616.80
7.3.10.0040.00716.69
7.3.00.0060.00816.76
7.2.330.0120.00916.83
7.2.320.0100.00717.01
7.2.310.0070.01316.95
7.2.300.0170.00516.80
7.2.290.0030.01316.72
7.2.250.0000.01915.16
7.2.240.0030.01715.15
7.2.230.0040.01515.28
7.2.220.0000.01115.25
7.2.210.0000.01614.98
7.2.200.0030.00815.07
7.2.190.0000.01715.08
7.2.180.0140.00315.33
7.2.170.0120.00315.00
7.2.130.0070.00917.07
7.2.120.0050.00917.06
7.2.110.0070.00516.93
7.2.100.0020.00916.97
7.2.90.0070.00917.18
7.2.80.0020.01417.22
7.2.70.0080.00316.99
7.2.60.0010.01317.11
7.2.50.0030.01017.04
7.2.40.0060.00317.19
7.2.30.0050.00716.91
7.2.20.0000.01317.22
7.2.10.0070.00517.16
7.2.00.0050.00717.91
7.1.330.0000.01315.91
7.1.320.0030.01015.51
7.1.310.0030.01015.75
7.1.300.0030.00615.97
7.1.290.0030.00915.95
7.1.280.0100.00615.83
7.1.270.0040.00415.98
7.1.260.0060.00616.05
7.1.250.0030.00615.98
7.1.200.0070.00715.83
7.1.100.0060.00618.18
7.1.70.0040.00417.21
7.1.60.0030.00917.31
7.1.50.0070.01417.11
7.1.00.0070.05322.33
7.0.200.0030.00616.98
7.0.140.0030.07022.16
7.0.120.0100.06722.18
7.0.110.0070.07320.11
7.0.100.0030.08320.02
7.0.90.0030.08019.99
7.0.80.0300.06319.95
7.0.70.0000.08719.98
7.0.60.0100.06719.93
7.0.50.0330.07719.88
7.0.40.0030.08319.88
7.0.30.0100.04019.75
7.0.20.0070.07019.85
7.0.10.0070.06319.72
7.0.00.0070.04319.73
5.6.280.0000.07721.09
5.6.260.0070.07320.63
5.6.250.0070.08320.68
5.6.240.0030.08020.66
5.6.230.0100.07720.70
5.6.220.0070.04020.44
5.6.210.0070.04720.65
5.6.200.0030.08020.55
5.6.190.0100.08020.58
5.6.180.0030.05720.61
5.6.170.0070.08320.70
5.6.160.0100.04320.65
5.6.150.0100.06720.64
5.6.140.0030.04320.85
5.6.130.0030.05320.55
5.6.120.0130.07320.56
5.6.110.0070.07020.64
5.6.100.0030.06320.61
5.6.90.0000.08320.56
5.6.80.0070.05320.02
5.6.70.0200.06320.22
5.6.60.0100.05320.02
5.6.50.0100.03319.93
5.6.40.0170.06719.92
5.6.30.0030.04020.00
5.6.20.0030.05720.06
5.6.10.0070.07719.98
5.6.00.0070.06319.96
5.5.380.0170.06317.63
5.5.370.0000.05017.61
5.5.360.0130.05317.64
5.5.350.0030.04017.77
5.5.340.0030.05318.10
5.5.330.0070.05718.16
5.5.320.0070.07718.26
5.5.310.0070.07318.13
5.5.300.0000.08718.12
5.5.290.0030.08318.16
5.5.280.0000.05317.86
5.5.270.0100.08017.85
5.5.260.0030.04317.98
5.5.250.0070.06017.58
5.5.240.0070.08017.25
5.5.230.0130.06317.50
5.5.220.0070.06017.54
5.5.210.0070.06317.24
5.5.200.0030.04317.45
5.5.190.0070.06017.21
5.5.180.0030.03717.26
5.5.160.0100.07717.48
5.5.150.0100.05717.60
5.5.140.0030.05717.50
5.5.130.0000.04717.24
5.5.120.0130.06317.21
5.5.110.0070.06017.21
5.5.100.0070.07017.42
5.5.90.0070.08017.35
5.5.80.0070.07317.10
5.5.70.0000.07317.25
5.5.60.0030.07317.11
5.5.50.0100.07317.33
5.5.40.0000.05717.09
5.5.30.0070.03717.01
5.5.20.0030.06017.10
5.5.10.0100.04317.41
5.5.00.0100.03017.00
5.4.450.0030.04719.32
5.4.440.0130.07719.36
5.4.430.0000.04319.27
5.4.420.0070.08319.30
5.4.410.0030.07019.31
5.4.400.0030.06018.93
5.4.390.0070.07319.08
5.4.380.0070.07319.11
5.4.370.0100.07019.16
5.4.360.0030.05019.12
5.4.350.0000.04319.16
5.4.340.0100.07019.18
5.4.320.0070.06019.27
5.4.310.0000.04019.12
5.4.300.0100.05719.16
5.4.290.0070.07319.16
5.4.280.0000.08018.95
5.4.270.0000.04319.09
5.4.260.0030.07319.03
5.4.250.0000.08018.94
5.4.240.0100.07019.02
5.4.230.0030.05718.92
5.4.220.0030.05319.24
5.4.210.0100.05319.11
5.4.200.0070.04319.02
5.4.190.0100.07019.02
5.4.180.0070.06719.26
5.4.170.0030.04319.10
5.4.160.0070.04018.93
5.4.150.0130.07319.23
5.4.140.0000.04016.58
5.4.130.0030.06316.32
5.4.120.0000.04016.21
5.4.110.0000.04016.55
5.4.100.0130.06016.43
5.4.90.0100.05016.46
5.4.80.0030.07016.29
5.4.70.0100.04316.23
5.4.60.0100.06716.26
5.4.50.0000.05316.10
5.4.40.0030.07316.38
5.4.30.0100.03316.38
5.4.20.0000.05716.25
5.4.10.0030.07016.35
5.4.00.0100.05715.67
5.3.290.0130.07714.68
5.3.280.0030.05714.61
5.3.270.0030.04314.55
5.3.260.0030.06014.62
5.3.250.0070.05714.46
5.3.240.0000.04314.62
5.3.230.0030.06014.54
5.3.220.0030.06014.39
5.3.210.0030.07714.43
5.3.200.0030.06014.45
5.3.190.0030.06014.46
5.3.180.0100.03714.37
5.3.170.0030.04314.50
5.3.160.0100.07314.39
5.3.150.0100.04314.48
5.3.140.0100.06314.62
5.3.130.0030.06314.49
5.3.120.0070.07714.56
5.3.110.0030.09314.50
5.3.100.0000.07313.96
5.3.90.0030.07713.86
5.3.80.0000.07313.80
5.3.70.0030.05013.80
5.3.60.0030.05014.06
5.3.50.0100.03313.88
5.3.40.0100.06013.88
5.3.30.0070.06013.84
5.3.20.0070.07013.61
5.3.10.0100.03313.72
5.3.00.0030.07313.71
5.2.170.0000.03713.02
5.2.160.0030.04713.02
5.2.150.0030.05313.02
5.2.140.0030.06013.02
5.2.130.0000.05013.02
5.2.120.0000.03313.02
5.2.110.0030.06013.02
5.2.100.0030.04313.02
5.2.90.0000.03313.02
5.2.80.0030.05013.02
5.2.70.0030.04713.02
5.2.60.0100.05313.02
5.2.50.0070.04313.02
5.2.40.0030.02713.02
5.2.30.0000.04013.02
5.2.20.0030.05313.02
5.2.10.0030.02713.02
5.2.00.0030.02713.02
5.1.60.0000.02713.02
5.1.50.0070.02313.02
5.1.40.0030.02313.02
5.1.30.0000.03313.02
5.1.20.0000.05713.02
5.1.10.0000.02713.02
5.1.00.0000.02713.02
5.0.50.0000.03313.02
5.0.40.0030.04013.02
5.0.30.0000.05013.02
5.0.20.0100.02713.02
5.0.10.0030.04713.02
5.0.00.0030.03313.02
4.4.90.0030.03313.02
4.4.80.0030.03313.02
4.4.70.0030.03013.02
4.4.60.0000.02013.02
4.4.50.0030.03313.02
4.4.40.0000.03013.02
4.4.30.0000.01713.02
4.4.20.0030.01313.02
4.4.10.0030.01313.02
4.4.00.0030.03013.02
4.3.110.0030.03313.02
4.3.100.0000.03013.02
4.3.90.0000.02713.02
4.3.80.0030.04713.02
4.3.70.0000.03713.02
4.3.60.0070.03013.02
4.3.50.0000.02313.02
4.3.40.0030.03713.02
4.3.30.0000.03013.02
4.3.20.0000.02713.02
4.3.10.0000.01313.02
4.3.00.0030.03013.02

preferences:
46.03 ms | 400 KiB | 5 Q