3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set("UTC"); echo "works as expected:\n"; echo date("Y-m-d H:i:s", strtotime("2019W14")) . " should be 2019-04-01\n"; echo date("Y-m-d H:i:s", strtotime("2019W15")) . " should be 2019-04-08\n"; echo date("Y-m-d H:i:s", strtotime("2019W16")) . " should be 2019-04-15\n\n"; echo "off by one:\n"; echo date("Y-m-d H:i:s", strtotime("2019W16 next tuesday")) . " should be 2019-04-16\n"; echo date("Y-m-d H:i:s", strtotime("2019W16 next wednesday")) . " should be 2019-04-17\n"; echo date("Y-m-d H:i:s", strtotime("2019W16 next thursday")) . " should be 2019-04-18\n"; echo date("Y-m-d H:i:s", strtotime("2019W16 next friday")) . " should be 2019-04-19\n"; echo date("Y-m-d H:i:s", strtotime("2019W16 next saturday")) . " should be 2019-04-20\n"; echo date("Y-m-d H:i:s", strtotime("2019W16 next sunday")) . " should be 2019-04-21\n"; echo date("Y-m-d H:i:s", strtotime("2019W16 next monday")) . " should be 2019-04-22\n\n"; echo "works as expected:\n"; echo date("Y-m-d H:i:s", strtotime("2019-04-15 next monday")) . " should be 2019-04-22\n"; echo date("Y-m-d H:i:s", strtotime("2019-04-15 next friday")) . " should be 2019-04-19\n"; echo date("Y-m-d H:i:s", strtotime("2019-04-15 next thursday")) . " should be 2019-04-18\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.70.0150.00016.50
8.3.60.0090.00618.43
8.3.50.0080.01018.30
8.3.40.0040.01118.97
8.3.30.0120.00418.84
8.3.20.0030.00621.89
8.3.10.0060.00321.95
8.3.00.0060.00321.85
8.2.190.0000.01416.58
8.2.180.0070.00718.18
8.2.170.0070.00722.96
8.2.160.0030.01020.56
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00419.77
8.2.120.0060.00326.35
8.2.110.0070.00321.24
8.2.100.0070.00717.65
8.2.90.0050.00318.03
8.2.80.0000.00819.76
8.2.70.0040.00417.63
8.2.60.0050.00317.75
8.2.50.0040.00417.59
8.2.40.0040.00419.38
8.2.30.0000.00820.41
8.2.20.0070.00017.96
8.2.10.0000.00719.38
8.2.00.0090.00018.04
8.1.280.0070.00725.92
8.1.270.0050.00520.52
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0090.00022.47
8.1.230.0080.00420.97
8.1.220.0040.00417.74
8.1.210.0030.00518.91
8.1.200.0030.00517.48
8.1.190.0080.00017.35
8.1.180.0090.00018.10
8.1.170.0000.00818.71
8.1.160.0040.00418.86
8.1.150.0040.00418.92
8.1.140.0030.00519.07
8.1.130.0060.00320.32
8.1.120.0040.00417.51
8.1.110.0050.00317.44
8.1.100.0070.00017.50
8.1.90.0000.00717.55
8.1.80.0030.00617.57
8.1.70.0000.00717.58
8.1.60.0040.00417.68
8.1.50.0040.00417.64
8.1.40.0040.00417.56
8.1.30.0040.00417.62
8.1.20.0080.00017.77
8.1.10.0000.00717.50
8.1.00.0040.00417.55
8.0.300.0000.00719.86
8.0.290.0050.00316.75
8.0.280.0030.00318.39
8.0.270.0000.00817.24
8.0.260.0000.00818.41
8.0.250.0070.00017.12
8.0.240.0030.00317.03
8.0.230.0030.00617.08
8.0.220.0000.00716.91
8.0.210.0000.00817.11
8.0.200.0070.00017.12
8.0.190.0060.00317.13
8.0.180.0000.00817.04
8.0.170.0000.00817.03
8.0.160.0040.00417.10
8.0.150.0000.00717.00
8.0.140.0040.00417.00
8.0.130.0030.00313.51
8.0.120.0050.00217.00
8.0.110.0040.00416.98
8.0.100.0080.00017.11
8.0.90.0040.00417.00
8.0.80.0000.01717.05
8.0.70.0040.00416.87
8.0.60.0050.00216.88
8.0.50.0000.00816.84
8.0.30.0120.00917.09
8.0.20.0090.00917.20
8.0.10.0000.00816.98
8.0.00.0080.01116.91
7.4.330.0000.00516.65
7.4.320.0060.00016.55
7.4.300.0040.00416.46
7.4.290.0070.00016.41
7.4.280.0040.00416.62
7.4.270.0030.00616.59
7.4.260.0000.00716.66
7.4.250.0000.00916.59
7.4.240.0030.00316.55
7.4.230.0070.00016.54
7.4.220.0030.00616.69
7.4.210.0090.00716.63
7.4.200.0000.00716.74
7.4.160.0100.00816.59
7.4.140.0150.00517.86
7.4.130.0090.00916.54
7.4.120.0070.01116.69
7.4.110.0070.01116.51
7.4.100.0060.01316.52
7.4.90.0090.00916.73
7.4.80.0110.00719.39
7.4.70.0070.01716.46
7.4.60.0170.00016.63
7.4.50.0070.01016.66
7.4.40.0100.01316.45
7.4.10.0050.01415.07
7.4.00.0070.01015.08
7.3.330.0030.00313.24
7.3.320.0000.00513.32
7.3.310.0040.00416.26
7.3.300.0030.00316.43
7.3.290.0000.00716.39
7.3.280.0080.01016.37
7.3.260.0080.01116.52
7.3.240.0100.01216.54
7.3.230.0030.01316.46
7.3.210.0110.00616.66
7.3.200.0120.00616.61
7.3.190.0100.00716.32
7.3.180.0060.00916.30
7.3.170.0040.01516.39
7.3.160.0140.00816.68
7.3.130.0050.01414.94
7.3.120.0080.01014.98
7.3.110.0020.01314.96
7.3.100.0070.00814.89
7.3.90.0090.00615.00
7.3.80.0090.00414.97
7.3.70.0070.00714.93
7.3.60.0040.01014.79
7.3.50.0080.00714.87
7.3.40.0050.00714.79
7.3.30.0070.00714.85
7.3.20.0080.00616.79
7.3.10.0070.00916.75
7.3.00.0060.00716.73
7.2.330.0150.00516.57
7.2.320.0040.01716.94
7.2.310.0090.01216.54
7.2.300.0090.00916.62
7.2.290.0080.00816.64
7.2.260.0020.01714.93
7.2.250.0080.01115.24
7.2.240.0070.01014.98
7.2.230.0070.00914.95
7.2.220.0040.01215.05
7.2.210.0030.00815.04
7.2.200.0060.00915.10
7.2.190.0080.00815.10
7.2.180.0050.00815.18
7.2.170.0070.00715.10
7.2.160.0090.00615.06
7.2.150.0080.00816.99
7.2.140.0080.00716.82
7.2.130.0050.00816.95
7.2.120.0080.00816.96
7.2.110.0060.00916.90
7.2.100.0060.00616.95
7.2.90.0060.01016.85
7.2.80.0050.01016.91
7.2.70.0060.00516.90
7.2.60.0080.00616.95
7.2.50.0100.00416.93
7.2.40.0080.00516.88
7.2.30.0080.00917.00
7.2.20.0090.00516.94
7.2.10.0090.00716.99
7.2.00.0060.01117.00
7.1.330.0050.00915.75
7.1.320.0080.00615.95
7.1.310.0070.00715.85
7.1.300.0040.00915.84
7.1.290.0040.00815.92
7.1.280.0060.00715.83
7.1.270.0060.00815.82
7.1.260.0080.00615.75
7.1.250.0050.00715.80
7.1.240.0050.00815.88
7.1.230.0050.01015.63
7.1.220.0100.00315.76
7.1.210.0090.00715.73
7.1.200.0070.00715.67
7.1.190.0020.00815.81
7.1.180.0060.00515.54
7.1.170.0020.01015.54
7.1.160.0060.00715.68
7.1.150.0060.01115.89
7.1.140.0100.00715.85
7.1.130.0040.01015.68
7.1.120.0070.01015.74
7.1.110.0050.00815.74
7.1.100.0070.00815.82
7.1.90.0090.00915.69
7.1.80.0090.00815.87
7.1.70.0140.00515.69
7.1.60.0080.00815.82
7.1.50.0070.01015.94
7.1.40.0090.00715.87
7.1.30.0050.01015.95
7.1.20.0090.00615.75
7.1.10.0050.00815.87
7.1.00.0060.00815.89
7.0.330.0160.01015.08
7.0.320.0030.01815.17
7.0.310.0100.01015.45
7.0.300.0100.01115.13
7.0.290.0090.00915.07
7.0.280.0080.00815.05
7.0.270.0050.00515.18
7.0.260.0070.00715.18
7.0.250.0000.01415.21
7.0.240.0060.01515.17
7.0.230.0080.00815.36
7.0.220.0260.00015.45
7.0.210.0160.00815.43
7.0.200.0150.01115.38
7.0.190.0080.00815.30
7.0.180.0140.01415.17
7.0.170.0090.01415.55
7.0.160.0070.01915.46
7.0.150.0210.00315.29
7.0.140.0150.01015.02
7.0.130.0120.00315.36
7.0.120.0090.01215.31
7.0.110.0190.00815.12
7.0.100.0070.01415.04
7.0.90.0180.00915.13
7.0.80.0160.00615.28
7.0.70.0050.00515.50
7.0.60.0090.00415.16
7.0.50.0180.00515.42
7.0.40.0120.01015.43
7.0.30.0150.00415.47
7.0.20.0180.01115.53
7.0.10.0120.00615.38
7.0.00.0130.00715.35
5.6.400.0000.01214.13
5.6.390.0110.01414.28
5.6.380.0140.01013.95
5.6.370.0060.00714.58
5.6.360.0040.01114.18
5.6.350.0140.00714.25
5.6.340.0150.00814.22
5.6.330.0100.01013.89
5.6.320.0100.00614.06
5.6.310.0150.01213.73
5.6.300.0200.00614.07
5.6.290.0130.01714.25
5.6.280.0170.00714.05
5.6.270.0110.01714.11
5.6.260.0220.01014.10
5.6.250.0040.00814.32
5.6.240.0090.01414.25
5.6.230.0110.00313.99
5.6.220.0100.00014.25
5.6.210.0100.01714.23
5.6.200.0190.01113.95
5.6.190.0050.01014.18
5.6.180.0140.00614.20
5.6.170.0030.01713.94
5.6.160.0220.00414.20
5.6.150.0190.00714.13
5.6.140.0140.00914.25
5.6.130.0090.00914.21
5.6.120.0080.00614.52
5.6.110.0110.00714.33
5.6.100.0130.01614.40
5.6.90.0170.01014.47
5.6.80.0150.01214.52
5.6.70.0060.00914.19
5.6.60.0050.01414.36
5.6.50.0130.00714.16
5.6.40.0210.00614.43
5.6.30.0140.01014.17
5.6.20.0160.00514.33
5.6.10.0180.00914.13
5.6.00.0080.00514.02
5.5.380.0150.01114.46
5.5.370.0090.00914.21
5.5.360.0170.00714.35
5.5.350.0090.00914.30
5.5.340.0070.01813.91
5.5.330.0220.00714.29
5.5.320.0150.00913.84
5.5.310.0140.00413.86
5.5.300.0160.01214.45
5.5.290.0110.01114.06
5.5.280.0150.00913.91
5.5.270.0090.01314.20
5.5.260.0050.02213.94
5.5.250.0060.01514.04
5.5.240.0190.01013.78
5.5.230.0120.00013.92
5.5.220.0090.00614.14
5.5.210.0070.01114.05
5.5.200.0120.00614.20
5.5.190.0240.00413.79
5.5.180.0090.00914.04
5.5.170.0150.01514.42
5.5.160.0190.00313.96
5.5.150.0140.00614.06
5.5.140.0070.01414.09
5.5.130.0200.00714.34
5.5.120.0220.00314.31
5.5.110.0030.01014.08
5.5.100.0160.00013.97
5.5.90.0120.00614.02
5.5.80.0110.00814.13
5.5.70.0030.01214.07
5.5.60.0140.01114.29
5.5.50.0140.00714.02
5.5.40.0040.01014.17
5.5.30.0150.01514.35
5.5.20.0150.01514.12
5.5.10.0170.01414.09
5.5.00.0060.01013.70
5.4.450.0060.00611.81
5.4.440.0140.00011.81
5.4.430.0040.01811.81
5.4.420.0140.00311.81
5.4.410.0100.01111.81
5.4.400.0080.00811.81
5.4.390.0040.00811.81
5.4.380.0070.00711.81
5.4.370.0140.00711.81
5.4.360.0160.00611.81
5.4.350.0190.00611.81
5.4.340.0090.00311.81
5.4.330.0180.00311.81
5.4.320.0110.01511.81
5.4.310.0150.00711.81
5.4.300.0070.01011.81
5.4.290.0070.01111.81
5.4.280.0040.01611.81
5.4.270.0080.00811.81
5.4.260.0110.00811.81
5.4.250.0050.01111.81
5.4.240.0110.00411.81
5.4.230.0080.00811.81
5.4.220.0080.00311.81
5.4.210.0080.00211.81
5.4.200.0080.00211.81
5.4.190.0160.00711.81
5.4.180.0130.00511.81
5.4.170.0060.01211.81
5.4.160.0100.00911.81
5.4.150.0140.00411.81
5.4.140.0090.01511.81
5.4.130.0080.00611.81
5.4.120.0140.00711.81
5.4.110.0040.00411.81
5.4.100.0080.00411.81
5.4.90.0160.00411.81
5.4.80.0110.00011.81
5.4.70.0130.01311.81
5.4.60.0110.00411.81
5.4.50.0160.00511.81
5.4.40.0130.00011.81
5.4.30.0110.00511.81
5.4.20.0080.00311.81
5.4.10.0070.00911.81
5.4.00.0090.00811.81
5.3.290.0050.01511.81
5.3.280.0190.00011.81
5.3.270.0160.00311.81
5.3.260.0040.01111.81
5.3.250.0000.01311.81
5.3.240.0150.00911.81
5.3.230.0180.00411.81
5.3.220.0170.00311.81
5.3.210.0170.00311.81
5.3.200.0150.00411.81
5.3.190.0130.00411.81
5.3.180.0100.00511.81
5.3.170.0190.00011.81
5.3.160.0060.01211.81
5.3.150.0160.00411.81
5.3.140.0110.00211.81
5.3.130.0090.00411.81
5.3.120.0100.00511.81
5.3.110.0080.00311.81
5.3.100.0050.00511.81
5.3.90.0060.01011.81
5.3.80.0090.01411.81
5.3.70.0160.00411.81
5.3.60.0100.00511.81
5.3.50.0190.00011.81
5.3.40.0150.00011.81
5.3.30.0090.00311.81
5.3.20.0070.00511.81
5.3.10.0060.00611.81
5.3.00.0090.00511.81
5.2.170.0090.00411.81
5.2.160.0070.00211.81
5.2.150.0070.00311.81
5.2.140.0100.00011.81
5.2.130.0070.00411.81
5.2.120.0100.00011.81
5.2.110.0050.01011.81
5.2.100.0080.00011.81
5.2.90.0030.00711.81
5.2.80.0060.00611.81
5.2.70.0090.00311.81
5.2.60.0050.00511.81
5.2.50.0080.00311.81
5.2.40.0100.00011.81
5.2.30.0100.00511.81
5.2.20.0070.01111.81
5.2.10.0080.00411.81
5.2.00.0050.01011.81
5.1.60.0070.00711.81
5.1.50.0090.00611.81
5.1.40.0050.01011.81
5.1.30.0140.00311.81
5.1.20.0070.00511.81
5.1.10.0120.00311.81
5.1.00.0040.00811.81
5.0.50.0110.00411.81
5.0.40.0100.00011.81
5.0.30.0050.00711.81
5.0.20.0050.00211.81
5.0.10.0050.00511.81
5.0.00.0070.00011.81
4.4.90.0000.00611.81
4.4.80.0000.00611.81
4.4.70.0080.00311.81
4.4.60.0090.00311.81
4.4.50.0090.00411.81
4.4.40.0110.00011.81
4.4.30.0090.00211.81
4.4.20.0060.00311.81
4.4.10.0080.00411.81
4.4.00.0060.00611.81
4.3.110.0060.00011.81
4.3.100.0030.00311.81
4.3.90.0030.00311.81
4.3.80.0060.00011.81
4.3.70.0050.00511.81
4.3.60.0050.00511.81
4.3.50.0060.00011.81
4.3.40.0000.00411.81
4.3.30.0020.00211.81
4.3.20.0080.00411.81
4.3.10.0070.00311.81
4.3.00.0080.00011.81

preferences:
18.22 ms | 401 KiB | 5 Q