3v4l.org

run code in 300+ PHP versions simultaneously
<?php //get First day of Month //get Last day of Month $first_day_of_month = mktime(0,0,0,date('n'),1,date('Y')); $last_day_of_month = mktime(23,59,59,date('n'),date('t'),date('Y')); echo "First Day of Month: "; echo $first_day_of_month; echo "<br />"; echo "Last Day of Month: "; echo $last_day_of_month; $datetest = array('05-15-2015','11-30-2014', '11-31-2014', '11-08-2014', '11-8-2014', '11-9-2014', '11-11-2014', '11-24-2014', '11-1-2014', '10-30-2014', '12-1-2014', '11-1-1997'); echo "<br /><br />\n\n"; foreach ($datetest as $datetest) { $split_date = explode("-",$datetest); $comp_date = mktime(0,0,0,$split_date[0],$split_date[1],$split_date[2]); if (($comp_date >= $first_day_of_month) && ($comp_date <= $last_day_of_month)){ echo "$datetest :"; echo " Is in Month!"; echo "<br />\n"; } else { echo "$datetest :"; echo "Not in Month!"; echo "<br />\n"; } }

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.00316.63
8.3.50.0170.00721.05
8.3.40.0210.00018.82
8.3.30.0040.01119.36
8.3.20.0030.00620.31
8.3.10.0070.01121.76
8.3.00.0080.00017.71
8.2.180.0180.00416.50
8.2.170.0040.01119.15
8.2.160.0110.00322.96
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0090.00019.61
8.2.110.0100.00020.92
8.2.100.0110.00018.16
8.2.90.0080.00019.17
8.2.80.0030.00517.97
8.2.70.0000.00817.75
8.2.60.0040.00417.93
8.2.50.0030.00518.10
8.2.40.0040.00418.28
8.2.30.0040.00418.20
8.2.20.0030.00617.83
8.2.10.0000.00818.32
8.2.00.0040.00418.32
8.1.280.0140.00425.92
8.1.270.0040.00420.40
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0080.00023.98
8.1.230.0120.00019.04
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0040.00417.23
8.1.180.0090.00218.10
8.1.170.0080.00018.80
8.1.160.0060.00318.85
8.1.150.0040.00418.93
8.1.140.0060.00317.59
8.1.130.0000.00717.85
8.1.120.0050.00317.65
8.1.110.0000.00817.66
8.1.100.0000.00717.58
8.1.90.0020.00517.63
8.1.80.0030.00317.59
8.1.70.0070.00017.50
8.1.60.0040.00417.68
8.1.50.0040.00417.52
8.1.40.0070.00417.65
8.1.30.0040.00417.74
8.1.20.0030.00617.70
8.1.10.0050.00317.62
8.1.00.0040.00417.48
8.0.300.0060.00318.77
8.0.290.0030.00616.88
8.0.280.0050.00318.62
8.0.270.0070.00017.29
8.0.260.0030.00317.39
8.0.250.0070.00017.13
8.0.240.0030.00316.99
8.0.230.0030.00316.98
8.0.220.0040.00416.98
8.0.210.0020.00516.95
8.0.200.0060.00017.10
8.0.190.0030.00617.12
8.0.180.0080.00317.07
8.0.170.0050.00217.02
8.0.160.0050.00317.01
8.0.150.0020.00516.88
8.0.140.0000.00817.04
8.0.130.0070.00013.41
8.0.120.0040.00417.02
8.0.110.0000.00717.07
8.0.100.0000.00716.89
8.0.90.0040.00416.83
8.0.80.0110.00717.08
8.0.70.0070.00017.00
8.0.60.0000.00816.89
8.0.50.0040.00416.87
8.0.30.0180.00617.34
8.0.20.0110.01417.40
8.0.10.0040.00417.13
8.0.00.0120.00916.81
7.4.330.0050.00015.07
7.4.320.0060.00316.50
7.4.300.0030.00316.70
7.4.290.0040.00416.68
7.4.280.0040.00416.68
7.4.270.0040.00416.49
7.4.260.0100.00016.61
7.4.250.0040.00416.61
7.4.240.0030.00316.66
7.4.230.0000.00716.58
7.4.220.0000.01816.59
7.4.210.0070.00716.66
7.4.200.0000.00716.56
7.4.160.0000.01616.59
7.4.150.0040.01517.40
7.4.140.0110.01217.86
7.4.130.0040.01516.59
7.4.120.0120.00816.71
7.4.110.0060.01316.74
7.4.100.0140.00416.36
7.4.90.0150.00616.66
7.4.80.0060.01119.39
7.4.70.0160.00016.58
7.4.60.0060.01216.79
7.4.50.0030.00516.70
7.4.40.0080.00916.77
7.4.30.0070.01616.70
7.4.00.0160.00015.34
7.3.330.0000.00713.24
7.3.320.0080.00013.20
7.3.310.0030.00316.50
7.3.300.0070.00016.25
7.3.290.0090.01016.40
7.3.280.0050.01316.37
7.3.270.0160.00817.40
7.3.260.0100.00716.68
7.3.250.0130.00816.43
7.3.240.0150.00816.70
7.3.230.0060.01616.39
7.3.210.0070.01016.53
7.3.200.0070.01119.39
7.3.190.0160.00016.69
7.3.180.0100.01316.63
7.3.170.0070.01416.59
7.3.160.0110.00516.69
7.3.10.0080.00716.86
7.3.00.0110.00616.76
7.2.330.0110.00616.82
7.2.320.0070.01016.80
7.2.310.0110.00616.66
7.2.300.0090.00916.55
7.2.290.0100.01316.59
7.2.130.0020.01117.07
7.2.120.0100.00316.79
7.2.110.0060.00817.13
7.2.100.0020.00916.87
7.2.90.0090.00717.12
7.2.80.0070.00517.01
7.2.70.0070.00717.01
7.2.60.0070.00817.21
7.2.50.0090.00916.79
7.2.40.0050.00816.89
7.2.30.0050.00717.22
7.2.20.0100.00616.73
7.2.10.0070.00716.71
7.2.00.0060.00817.71
7.1.250.0070.00715.90
7.1.100.0130.01718.17
7.1.70.0060.00617.22
7.1.60.0060.01819.50
7.1.50.0110.01417.11
7.1.00.0070.07322.31
7.0.200.0310.00614.78
7.0.100.0030.06720.05
7.0.90.0230.03319.96
7.0.80.0030.05320.04
7.0.70.0070.08019.90
7.0.60.0070.09019.93
7.0.50.0100.05020.26
7.0.40.0100.07320.09
7.0.30.0000.07720.07
7.0.20.0030.08720.14
7.0.10.0030.05020.11
7.0.00.0100.07320.10
5.6.280.0000.07720.82
5.6.250.0000.06020.57
5.6.240.0070.08320.73
5.6.230.0000.09020.53
5.6.220.0130.06720.75
5.6.210.0070.08320.57
5.6.200.0170.05020.97
5.6.190.0130.07321.05
5.6.180.0000.07020.94
5.6.170.0030.08720.96
5.6.160.0070.06321.14
5.6.150.0000.04721.03
5.6.140.0100.06021.17
5.6.130.0030.08320.96
5.6.120.0070.08721.08
5.6.110.0030.09020.99
5.6.100.0130.06021.04
5.6.90.0070.08720.91
5.6.80.0130.07320.48
5.6.70.0000.06020.45
5.6.60.0030.06320.41
5.6.50.0130.07720.48
5.6.40.0100.07320.37
5.6.30.0100.04320.46
5.6.20.0030.06020.31
5.6.10.0100.07720.43
5.6.00.0100.07320.46
5.5.380.0070.07720.42
5.5.370.0070.06320.55
5.5.360.0070.05720.34
5.5.350.0030.09320.39
5.5.340.0100.07720.93
5.5.330.0030.07020.87
5.5.320.0100.08020.79
5.5.310.0130.06320.87
5.5.300.0170.07320.93
5.5.290.0000.09020.92
5.5.280.0030.08720.75
5.5.270.0130.08020.64
5.5.260.0070.06720.79
5.5.250.0200.03320.43
5.5.240.0030.06720.28
5.5.230.0030.08320.27
5.5.220.0070.05020.17
5.5.210.0100.08020.14
5.5.200.0070.07720.18
5.5.190.0030.08020.16
5.5.180.0030.04720.24
5.5.160.0130.06720.16
5.5.150.0030.04720.21
5.5.140.0000.04720.13
5.5.130.0070.07020.27
5.5.120.0070.06020.09
5.5.110.0070.07320.16
5.5.100.0030.08320.08
5.5.90.0070.06720.16
5.5.80.0100.07320.05
5.5.70.0170.07319.94
5.5.60.0100.06020.07
5.5.50.0100.07720.08
5.5.40.0000.05320.14
5.5.30.0070.04320.12
5.5.20.0100.05020.06
5.5.10.0000.08019.98
5.5.00.0100.04720.04
5.4.450.0100.04319.39
5.4.440.0030.07319.39
5.4.430.0070.04019.39
5.4.420.0030.08719.38
5.4.410.0070.04319.28
5.4.400.0100.05718.79
5.4.390.0130.07319.09
5.4.380.0000.08019.15
5.4.370.0070.08018.98
5.4.360.0200.06719.09
5.4.350.0170.05719.06
5.4.340.0070.04319.19
5.4.320.0170.03319.07
5.4.310.0100.06018.94
5.4.300.0030.07318.98
5.4.290.0170.06319.04
5.4.280.0100.07719.12
5.4.270.0070.07018.97
5.4.260.0070.07018.91
5.4.250.0100.06719.11
5.4.240.0070.07319.01
5.4.230.0130.05718.89
5.4.220.0030.08318.80
5.4.210.0070.07319.22
5.4.200.0130.04719.02
5.4.190.0030.07318.80
5.4.180.0200.05719.05
5.4.170.0100.06319.09
5.4.160.0130.05319.12
5.4.150.0070.07719.07
5.4.140.0130.07316.42
5.4.130.0000.08016.31
5.4.120.0030.06316.30
5.4.110.0000.07316.43
5.4.100.0030.07316.41
5.4.90.0070.07316.50
5.4.80.0070.06016.30
5.4.70.0070.07716.21
5.4.60.0130.05316.39
5.4.50.0030.06316.43
5.4.40.0030.04716.40
5.4.30.0100.07316.24
5.4.20.0100.06716.18
5.4.10.0130.03716.27
5.4.00.0100.05715.70
5.3.290.0030.08714.64
5.3.280.0030.07314.59
5.3.270.0030.08014.53
5.3.260.0130.06714.57
5.3.250.0070.06314.57
5.3.240.0070.07714.62
5.3.230.0130.07014.57
5.3.220.0100.07014.52
5.3.210.0070.05314.57
5.3.200.0100.05314.46
5.3.190.0000.08314.54
5.3.180.0030.04714.41
5.3.170.0100.07014.44
5.3.160.0070.05714.44
5.3.150.0070.07714.51
5.3.140.0130.06014.55
5.3.130.0100.07014.42
5.3.120.0030.08014.50
5.3.110.0100.07314.55
5.3.100.0030.08013.86
5.3.90.0070.07714.01
5.3.80.0070.07313.98
5.3.70.0030.06314.02
5.3.60.0130.06713.96
5.3.50.0030.07013.82
5.3.40.0070.04713.75
5.3.30.0130.06013.92
5.3.20.0100.07013.68
5.3.10.0130.05713.67
5.3.00.0000.08013.61
5.2.170.0030.04712.75
5.2.160.0030.05712.75
5.2.150.0030.03012.75
5.2.140.0030.03712.75
5.2.130.0030.03712.75
5.2.120.0030.06312.75
5.2.110.0030.05312.75
5.2.100.0070.04012.75
5.2.90.0170.05012.75
5.2.80.0100.05712.75
5.2.70.0000.06712.75
5.2.60.0030.05312.75
5.2.50.0070.06012.75
5.2.40.0070.06012.75
5.2.30.0030.06312.75
5.2.20.0070.05012.75
5.2.10.0030.04712.75
5.2.00.0070.03312.75
5.1.60.0030.05312.75
5.1.50.0070.05012.75
5.1.40.0030.05312.75
5.1.30.0100.04312.75
5.1.20.0070.04312.75
5.1.10.0070.03012.75
5.1.00.0000.04712.75
5.0.50.0070.03012.75
5.0.40.0070.02712.75
5.0.30.0000.05012.75
5.0.20.0030.04012.75
5.0.10.0000.04312.75
5.0.00.0000.06712.75
4.4.90.0030.03312.75
4.4.80.0070.03312.75
4.4.70.0030.03312.75
4.4.60.0000.03012.75
4.4.50.0000.03312.75
4.4.40.0100.03312.75
4.4.30.0000.03312.75
4.4.20.0000.03712.75
4.4.10.0030.03312.75
4.4.00.0030.03712.75
4.3.110.0030.03012.75
4.3.100.0000.03312.75
4.3.90.0030.02312.75
4.3.80.0030.05312.75
4.3.70.0030.03312.75
4.3.60.0030.02312.75
4.3.50.0100.03012.75
4.3.40.0030.05012.75
4.3.30.0000.02312.75
4.3.20.0000.03012.75
4.3.10.0000.03312.75
4.3.00.0000.03712.75

preferences:
55.22 ms | 401 KiB | 5 Q