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('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.00418.31
8.3.50.0140.00521.95
8.3.40.0120.00318.94
8.3.30.0090.00919.09
8.3.20.0040.00420.25
8.3.10.0040.00423.65
8.3.00.0110.00719.50
8.2.180.0040.01225.92
8.2.170.0070.00719.16
8.2.160.0110.00422.96
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0070.01126.16
8.2.120.0080.00021.07
8.2.110.0060.00321.10
8.2.100.0050.00517.91
8.2.90.0000.00818.16
8.2.80.0030.00518.22
8.2.70.0080.00017.75
8.2.60.0030.00717.73
8.2.50.0080.00017.55
8.2.40.0000.00818.47
8.2.30.0000.00818.09
8.2.20.0000.00817.82
8.2.10.0040.00418.18
8.2.00.0040.00417.84
8.1.280.0070.01125.92
8.1.270.0050.00323.99
8.1.260.0030.00626.35
8.1.250.0050.00328.09
8.1.240.0030.00722.71
8.1.230.0040.00820.89
8.1.220.0000.00817.91
8.1.210.0080.00019.04
8.1.200.0040.00417.47
8.1.190.0050.00317.36
8.1.180.0030.00518.10
8.1.170.0040.00418.78
8.1.160.0050.00318.91
8.1.150.0000.00719.02
8.1.140.0050.00317.54
8.1.130.0030.00317.91
8.1.120.0000.00717.47
8.1.110.0030.00517.53
8.1.100.0000.00717.59
8.1.90.0030.00717.51
8.1.80.0030.00417.58
8.1.70.0000.00717.54
8.1.60.0050.00317.70
8.1.50.0000.00817.59
8.1.40.0060.00317.55
8.1.30.0040.00417.62
8.1.20.0050.00217.61
8.1.10.0070.00317.72
8.1.00.0000.00717.62
8.0.300.0000.00720.01
8.0.290.0030.00516.88
8.0.280.0000.00718.55
8.0.270.0000.00716.88
8.0.260.0030.00317.36
8.0.250.0000.00717.07
8.0.240.0030.00317.00
8.0.230.0030.00317.13
8.0.220.0000.00716.98
8.0.210.0030.00316.93
8.0.200.0000.00817.00
8.0.190.0000.00917.13
8.0.180.0040.00416.96
8.0.170.0040.00417.04
8.0.160.0070.00317.06
8.0.150.0050.00217.03
8.0.140.0030.00317.00
8.0.130.0030.00313.40
8.0.120.0040.00416.91
8.0.110.0020.00517.04
8.0.100.0040.00417.00
8.0.90.0000.00817.04
8.0.80.0070.01016.93
8.0.70.0040.00416.92
8.0.60.0000.00717.06
8.0.50.0040.00416.86
8.0.30.0100.01117.21
8.0.20.0120.00817.43
8.0.10.0030.00317.10
8.0.00.0100.00716.88
7.4.330.0050.00015.27
7.4.320.0050.00316.46
7.4.300.0000.00616.60
7.4.290.0070.00016.70
7.4.280.0000.00716.64
7.4.270.0070.00016.61
7.4.260.0040.00416.58
7.4.250.0030.00516.51
7.4.240.0020.00516.69
7.4.230.0000.00816.53
7.4.220.0030.01416.74
7.4.210.0120.00316.60
7.4.200.0070.00016.64
7.4.160.0100.00616.68
7.4.150.0130.01017.40
7.4.140.0100.01217.86
7.4.130.0120.00716.72
7.4.120.0160.00516.57
7.4.110.0060.01716.71
7.4.100.0130.00316.64
7.4.90.0130.00616.50
7.4.80.0110.00919.39
7.4.70.0110.00616.43
7.4.60.0200.00316.79
7.4.50.0000.00616.49
7.4.40.0040.01316.57
7.4.30.0100.00716.73
7.4.00.0080.01014.92
7.3.330.0000.00613.31
7.3.320.0050.00013.17
7.3.310.0030.00616.25
7.3.300.0030.00316.40
7.3.290.0060.01016.37
7.3.280.0100.00716.38
7.3.270.0160.00317.40
7.3.260.0190.00416.30
7.3.250.0050.01216.65
7.3.240.0130.00716.38
7.3.230.0130.00316.57
7.3.210.0090.00916.65
7.3.200.0110.00519.39
7.3.190.0070.01416.75
7.3.180.0100.00716.70
7.3.170.0150.00316.61
7.3.160.0060.00916.51
7.3.120.0090.01114.89
7.3.110.0090.01114.98
7.3.100.0000.01714.95
7.3.90.0090.00715.01
7.3.80.0080.00714.93
7.3.70.0090.00814.84
7.3.60.0080.00814.79
7.3.50.0130.00414.84
7.3.40.0080.00414.92
7.3.30.0080.00714.94
7.3.20.0030.01016.72
7.3.10.0050.01316.63
7.3.00.0100.00816.59
7.2.330.0090.00916.61
7.2.320.0070.01717.00
7.2.310.0160.00616.53
7.2.300.0070.01016.54
7.2.290.0080.00816.53
7.2.250.0070.01114.81
7.2.240.0040.01415.21
7.2.230.0030.01115.25
7.2.220.0070.01015.28
7.2.210.0130.00615.02
7.2.200.0020.01414.87
7.2.190.0070.00815.07
7.2.180.0090.01115.24
7.2.170.0050.01415.07
7.2.160.0180.00014.98
7.2.150.0120.00917.16
7.2.140.0110.01017.05
7.2.130.0140.00716.96
7.2.120.0070.01117.07
7.2.110.0130.01016.90
7.2.100.0070.01017.14
7.2.90.0070.01017.17
7.2.80.0110.00616.87
7.2.70.0100.00616.63
7.2.60.0120.00317.10
7.2.50.0070.01017.09
7.2.40.0120.00616.89
7.2.30.0120.00616.88
7.2.20.0120.00616.77
7.2.10.0030.01617.11
7.2.00.0090.00618.19
7.1.330.0060.01016.04
7.1.320.0120.00615.94
7.1.310.0110.00715.89
7.1.300.0080.00715.88
7.1.290.0100.00815.66
7.1.280.0050.01015.57
7.1.270.0120.00615.88
7.1.260.0070.01315.86
7.1.250.0070.01615.86
7.1.240.0080.01615.61
7.1.230.0120.01015.57
7.1.220.0110.01115.74
7.1.210.0110.00615.41
7.1.200.0100.00515.71
7.1.190.0110.00815.57
7.1.180.0080.00815.76
7.1.170.0090.01215.83
7.1.160.0140.00315.66
7.1.150.0150.00515.60
7.1.140.0000.01915.59
7.1.130.0140.00815.68
7.1.120.0090.00915.67
7.1.110.0150.00815.64
7.1.100.0100.00516.80
7.1.90.0090.01215.62
7.1.80.0140.00815.82
7.1.70.0060.01016.31
7.1.60.0120.01017.44
7.1.50.0120.01216.46
7.1.40.0150.00615.53
7.1.30.0110.00915.30
7.1.20.0110.01015.41
7.1.10.0100.00715.80
7.1.00.0120.03918.84
7.0.330.0110.01115.30
7.0.320.0080.01215.29
7.0.310.0070.01015.22
7.0.300.0210.00015.25
7.0.290.0100.01015.34
7.0.280.0050.01115.34
7.0.270.0110.00615.19
7.0.260.0060.01015.30
7.0.250.0160.00315.22
7.0.240.0160.00415.20
7.0.230.0170.00315.46
7.0.220.0120.00615.38
7.0.210.0110.00715.21
7.0.200.0050.00816.12
7.0.190.0090.01214.94
7.0.180.0110.00815.11
7.0.170.0090.01115.38
7.0.160.0160.00015.34
7.0.150.0110.00615.31
7.0.140.0050.04418.53
7.0.130.0140.00415.17
7.0.120.0070.04018.76
7.0.110.0050.04418.70
7.0.100.0070.03518.71
7.0.90.0090.03918.58
7.0.80.0090.04018.73
7.0.70.0080.04118.54
7.0.60.0070.04218.67
7.0.50.0140.03318.73
7.0.40.0110.03718.66
7.0.30.0040.04218.57
7.0.20.0080.03918.68
7.0.10.0080.03918.71
7.0.00.0090.04118.69
5.6.400.0100.01514.23
5.6.390.0080.01114.18
5.6.380.0100.01014.21
5.6.370.0120.00314.48
5.6.360.0030.01714.61
5.6.350.0110.01114.51
5.6.340.0060.00914.27
5.6.330.0060.01214.59
5.6.320.0030.01214.43
5.6.310.0100.00714.33
5.6.300.0060.01014.64
5.6.290.0110.00414.40
5.6.280.0090.03617.68
5.6.270.0160.00414.49
5.6.260.0100.03917.61
5.6.250.0100.03717.68
5.6.240.0070.04417.74
5.6.230.0100.04117.76
5.6.220.0040.03617.63
5.6.210.0040.04417.75
5.6.200.0070.04017.72
5.6.190.0100.03817.58
5.6.180.0070.03917.54
5.6.170.0050.04117.49
5.6.160.0030.04517.81
5.6.150.0050.04317.58
5.6.140.0010.04717.77
5.6.130.0090.04017.79
5.6.120.0110.03917.66
5.6.110.0050.04717.71
5.6.100.0070.04417.78
5.6.90.0090.03817.62
5.6.80.0110.03117.45
5.6.70.0040.04217.23
5.6.60.0070.03917.35
5.6.50.0050.03317.35
5.6.40.0110.03017.33
5.6.30.0080.03217.53
5.6.20.0070.04217.23
5.6.10.0070.03717.46
5.6.00.0110.02817.51
5.5.380.0130.04016.03
5.5.370.0040.04316.00
5.5.360.0060.04315.89
5.5.350.0100.03815.77
5.5.340.0040.04216.30
5.5.330.0080.04116.27
5.5.320.0080.03916.16
5.5.310.0070.04316.32
5.5.300.0120.04116.17
5.5.290.0080.04516.33
5.5.280.0110.04116.42
5.5.270.0080.04216.15
5.5.260.0090.03916.15
5.5.250.0080.04416.19
5.5.240.0120.03615.78
5.5.230.0150.03515.61
5.5.220.0080.03816.02
5.5.210.0100.03315.93
5.5.200.0060.04115.82
5.5.190.0090.04015.95
5.5.180.0090.04215.91
5.5.170.0140.00714.48
5.5.160.0180.02715.71
5.5.150.0080.03715.79
5.5.140.0090.03715.81
5.5.130.0070.04215.67
5.5.120.0080.03815.76
5.5.110.0100.03615.99
5.5.100.0090.04115.81
5.5.90.0090.04015.79
5.5.80.0110.03715.96
5.5.70.0120.03315.87
5.5.60.0080.03915.72
5.5.50.0070.03915.73
5.5.40.0080.03815.67
5.5.30.0080.04115.87
5.5.20.0080.04015.80
5.5.10.0070.04015.82
5.5.00.0010.04715.69
5.4.450.0080.04015.13
5.4.440.0120.03715.26
5.4.430.0090.03815.26
5.4.420.0060.03815.22
5.4.410.0040.04215.28
5.4.400.0080.03615.13
5.4.390.0090.03515.13
5.4.380.0060.03615.16
5.4.370.0050.03715.01
5.4.360.0020.04014.97
5.4.350.0100.03515.11
5.4.340.0040.04014.98
5.4.330.0090.00711.01
5.4.320.0030.04415.15
5.4.310.0050.03915.09
5.4.300.0080.03615.01
5.4.290.0090.03515.00
5.4.280.0130.03114.92
5.4.270.0050.03815.03
5.4.260.0060.03914.91
5.4.250.0080.03914.93
5.4.240.0070.03714.98
5.4.230.0040.03914.88
5.4.220.0100.03714.99
5.4.210.0040.03815.19
5.4.200.0080.03214.97
5.4.190.0100.03715.06
5.4.180.0080.03715.01
5.4.170.0040.03715.04
5.4.160.0050.03715.01
5.4.150.0070.03815.08
5.4.140.0040.03813.79
5.4.130.0050.03813.64
5.4.120.0110.03313.74
5.4.110.0080.03513.64
5.4.100.0070.03513.94
5.4.90.0070.03413.72
5.4.80.0070.03513.80
5.4.70.0090.03313.75
5.4.60.0060.03513.73
5.4.50.0050.03513.67
5.4.40.0080.03513.69
5.4.30.0090.02513.74
5.4.20.0050.03613.59
5.4.10.0120.03213.79
5.4.00.0060.03113.40

preferences:
46.22 ms | 401 KiB | 5 Q