3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (function_exists('date_default_timezone_set')) 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.60.0040.01118.55
8.3.50.0110.00917.63
8.3.40.0150.00618.83
8.3.30.0100.00618.84
8.3.20.0050.00321.76
8.3.10.0080.00021.76
8.3.00.0030.00621.90
8.2.180.0160.00018.16
8.2.170.0120.00322.96
8.2.160.0040.01120.52
8.2.150.0090.00024.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0070.00021.07
8.2.110.0100.00020.86
8.2.100.0060.00619.45
8.2.90.0050.00320.54
8.2.80.0050.00220.63
8.2.70.0060.00317.75
8.2.60.0060.00318.09
8.2.50.0050.00318.10
8.2.40.0060.00319.36
8.2.30.0040.00420.41
8.2.20.0000.00718.09
8.2.10.0070.00019.28
8.2.00.0030.00518.07
8.1.280.0120.00325.92
8.1.270.0080.00018.75
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00322.27
8.1.230.0090.00320.93
8.1.220.0000.00917.74
8.1.210.0030.00619.03
8.1.200.0060.00317.35
8.1.190.0050.00317.13
8.1.180.0000.00818.10
8.1.170.0040.00418.74
8.1.160.0000.00718.92
8.1.150.0000.00718.98
8.1.140.0040.00419.00
8.1.130.0000.00720.25
8.1.120.0050.00217.55
8.1.110.0040.00417.64
8.1.100.0050.00317.66
8.1.90.0080.00017.60
8.1.80.0030.00517.61
8.1.70.0030.00317.63
8.1.60.0040.00417.74
8.1.50.0000.00817.49
8.1.40.0030.00617.63
8.1.30.0040.00417.74
8.1.20.0040.00417.63
8.1.10.0070.00017.58
8.1.00.0000.00717.58
8.0.300.0000.00820.21
8.0.290.0040.00416.88
8.0.280.0040.00418.41
8.0.270.0000.00817.33
8.0.260.0030.00318.40
8.0.250.0040.00417.09
8.0.240.0000.00717.11
8.0.230.0040.00417.13
8.0.220.0000.00716.93
8.0.210.0030.00316.96
8.0.200.0030.00317.12
8.0.190.0040.00417.12
8.0.180.0080.00017.02
8.0.170.0000.00917.07
8.0.160.0040.00417.13
8.0.150.0080.00016.90
8.0.140.0080.00017.02
8.0.130.0000.00513.55
8.0.120.0040.00416.89
8.0.110.0000.00716.87
8.0.100.0050.00316.97
8.0.90.0050.00317.16
8.0.80.0130.00717.01
8.0.70.0080.00016.92
8.0.60.0070.00016.95
8.0.50.0070.00016.95
8.0.30.0040.01517.23
8.0.20.0180.01017.02
8.0.10.0000.00917.11
8.0.00.0150.00716.75
7.4.330.0000.00516.53
7.4.320.0000.00716.53
7.4.300.0000.00616.52
7.4.290.0000.00716.57
7.4.280.0040.00416.60
7.4.270.0090.00016.62
7.4.260.0040.00416.61
7.4.250.0030.00316.61
7.4.240.0000.00716.68
7.4.230.0000.00716.70
7.4.220.0030.00516.73
7.4.210.0100.00916.51
7.4.200.0040.00416.64
7.4.160.0080.00916.61
7.4.140.0090.00917.86
7.4.130.0090.00916.59
7.4.120.0040.01716.65
7.4.110.0110.00516.70
7.4.100.0150.00316.57
7.4.90.0000.01716.53
7.4.80.0090.01519.39
7.4.70.0090.00916.76
7.4.60.0100.00716.57
7.4.50.0060.00616.33
7.4.40.0100.01016.66
7.4.00.0110.00515.12
7.3.330.0060.00013.39
7.3.320.0030.00313.08
7.3.310.0000.00716.24
7.3.300.0000.00716.39
7.3.290.0070.00016.39
7.3.280.0100.01016.36
7.3.260.0090.01016.47
7.3.240.0100.00816.53
7.3.230.0080.00816.32
7.3.210.0070.01016.34
7.3.200.0070.01016.31
7.3.190.0030.01416.70
7.3.180.0140.00316.43
7.3.170.0120.00416.53
7.3.160.0190.00416.38
7.3.120.0090.01014.99
7.3.110.0070.00915.05
7.3.100.0020.01314.97
7.3.90.0050.00914.87
7.3.80.0070.00715.02
7.3.70.0040.00715.02
7.3.60.0060.00914.85
7.3.50.0040.00814.98
7.3.40.0040.01014.94
7.3.30.0080.00814.93
7.3.20.0070.00916.83
7.3.10.0090.00616.70
7.3.00.0100.00516.74
7.2.330.0090.01616.90
7.2.320.0060.01516.68
7.2.310.0130.01016.66
7.2.300.0080.00916.52
7.2.290.0110.00716.38
7.2.250.0070.01415.02
7.2.240.0100.00714.97
7.2.230.0050.01114.88
7.2.220.0080.00615.13
7.2.210.0050.01215.04
7.2.200.0080.00715.08
7.2.190.0070.01015.03
7.2.180.0070.00515.03
7.2.170.0080.00614.95
7.2.160.0070.01015.09
7.2.150.0110.00816.92
7.2.140.0090.01116.98
7.2.130.0070.01117.03
7.2.120.0050.00717.02
7.2.110.0120.00616.95
7.2.100.0080.00616.95
7.2.90.0100.00916.81
7.2.80.0060.01116.98
7.2.70.0080.01116.92
7.2.60.0070.00716.78
7.2.50.0090.00616.72
7.2.40.0050.00816.97
7.2.30.0110.01016.85
7.2.20.0080.01316.78
7.2.10.0070.00916.98
7.2.00.0060.01216.81
7.1.330.0030.00915.83
7.1.320.0060.00815.74
7.1.310.0060.00815.91
7.1.300.0080.00615.73
7.1.290.0030.00815.78
7.1.280.0110.00115.70
7.1.270.0030.01315.70
7.1.260.0050.00815.79
7.1.250.0020.01415.72
7.1.240.0130.01015.63
7.1.230.0160.00315.43
7.1.220.0000.01815.78
7.1.210.0070.01415.88
7.1.200.0130.01315.71
7.1.190.0140.00815.79
7.1.180.0150.00815.61
7.1.170.0100.00715.52
7.1.160.0180.00715.67
7.1.150.0100.01015.86
7.1.140.0090.00715.67
7.1.130.0190.00015.33
7.1.120.0100.01515.68
7.1.110.0220.00415.78
7.1.100.0130.00715.88
7.1.90.0090.01215.96
7.1.80.0110.01115.64
7.1.70.0130.00315.68
7.1.60.0110.01115.92
7.1.50.0130.00815.95
7.1.40.0150.00815.72
7.1.30.0220.00313.79
7.1.20.0110.00613.80
7.1.10.0140.00315.60
7.1.00.0030.01315.74
7.0.330.0090.01615.30
7.0.320.0120.00715.30
7.0.310.0090.00915.28
7.0.300.0080.01215.34
7.0.290.0140.00815.30
7.0.280.0080.00815.11
7.0.270.0160.00815.09
7.0.260.0240.01015.35
7.0.250.0160.00915.29
7.0.240.0080.01115.55
7.0.230.0150.00915.49
7.0.220.0120.00315.36
7.0.210.0100.00815.36
7.0.200.0160.01115.57
7.0.190.0230.00015.44
7.0.180.0110.00815.42
7.0.170.0240.00015.29
7.0.160.0090.01315.56
7.0.150.0110.00415.52
7.0.140.0100.01415.32
7.0.130.0120.01315.50
7.0.120.0130.00715.25
7.0.110.0160.01515.37
7.0.100.0100.00715.55
7.0.90.0160.00815.25
7.0.80.0200.00415.49
7.0.70.0100.01015.12
7.0.60.0130.01315.38
7.0.50.0070.00915.64
7.0.40.0160.00715.43
7.0.30.0110.00915.53
7.0.20.0080.00815.45
7.0.10.0180.00015.63
7.0.00.0120.00915.11
5.6.400.0120.00014.30
5.6.390.0110.01214.20
5.6.380.0170.00614.34
5.6.370.0060.01914.05
5.6.360.0200.01014.36
5.6.350.0050.02014.03
5.6.340.0140.00414.04
5.6.330.0110.00914.14
5.6.320.0040.01913.92
5.6.310.0170.01414.27
5.6.300.0070.00814.13
5.6.290.0170.00614.16
5.6.280.0210.00414.38
5.6.270.0210.00914.44
5.6.260.0130.01314.33
5.6.250.0130.00614.55
5.6.240.0190.01314.27
5.6.230.0190.01113.99
5.6.220.0120.00714.24
5.6.210.0130.02014.14
5.6.200.0130.01314.13
5.6.190.0170.00714.54
5.6.180.0140.01414.16
5.6.170.0180.01114.41
5.6.160.0140.00814.31
5.6.150.0100.00614.23
5.6.140.0170.00814.30
5.6.130.0160.00314.48
5.6.120.0170.00714.46
5.6.110.0060.00914.32
5.6.100.0190.01214.41
5.6.90.0180.01114.42
5.6.80.0190.01314.01
5.6.70.0050.01614.32
5.6.60.0090.01614.28
5.6.50.0240.00914.32
5.6.40.0090.01714.12
5.6.30.0210.00814.21
5.6.20.0070.00714.38
5.6.10.0060.01114.28
5.6.00.0190.01014.16
5.5.380.0150.00614.24
5.5.370.0240.00714.30
5.5.360.0110.00613.93
5.5.350.0090.01414.18
5.5.340.0000.01714.51
5.5.330.0130.01714.45
5.5.320.0150.01314.02
5.5.310.0140.01214.16
5.5.300.0240.00214.33
5.5.290.0090.00914.38
5.5.280.0120.00914.15
5.5.270.0100.01314.08
5.5.260.0110.00914.61
5.5.250.0150.00314.05
5.5.240.0100.01314.26
5.5.230.0070.01013.99
5.5.220.0190.01314.38
5.5.210.0160.00414.19
5.5.200.0100.00814.40
5.5.190.0250.00613.93
5.5.180.0080.01114.08
5.5.170.0130.00814.02
5.5.160.0160.00814.19
5.5.150.0230.00014.32
5.5.140.0080.00814.01
5.5.130.0180.00614.24
5.5.120.0170.01114.38
5.5.110.0130.00914.34
5.5.100.0070.02214.12
5.5.90.0190.00913.92
5.5.80.0130.00514.23
5.5.70.0160.01114.17
5.5.60.0140.01414.03
5.5.50.0080.00814.20
5.5.40.0140.01714.31
5.5.30.0060.00714.38
5.5.20.0100.02014.28
5.5.10.0210.00313.96
5.5.00.0190.00314.08
5.4.450.0090.00611.81
5.4.440.0070.01111.81
5.4.430.0110.01111.81
5.4.420.0100.00611.81
5.4.410.0100.00311.81
5.4.400.0040.01311.81
5.4.390.0110.00511.81
5.4.380.0140.00311.81
5.4.370.0000.01111.81
5.4.360.0070.00511.81
5.4.350.0090.00311.81
5.4.340.0100.00711.81
5.4.330.0060.00611.81
5.4.320.0060.00311.81
5.4.310.0040.00711.81
5.4.300.0120.00311.81
5.4.290.0130.00511.81
5.4.280.0070.00711.81
5.4.270.0100.00311.81
5.4.260.0100.00911.81
5.4.250.0040.00911.81
5.4.240.0090.00811.81
5.4.230.0120.00611.81
5.4.220.0140.00411.81
5.4.210.0120.00411.81
5.4.200.0080.00811.81
5.4.190.0060.00311.81
5.4.180.0050.00911.81
5.4.170.0100.00511.81
5.4.160.0180.00911.81
5.4.150.0060.00911.81
5.4.140.0120.00411.81
5.4.130.0070.00511.81
5.4.120.0100.00311.81
5.4.110.0130.00311.81
5.4.100.0120.00611.81
5.4.90.0120.00311.81
5.4.80.0090.00411.81
5.4.70.0090.00311.81
5.4.60.0110.00311.81
5.4.50.0080.00511.81
5.4.40.0180.00311.81
5.4.30.0070.00511.81
5.4.20.0070.00611.81
5.4.10.0140.00511.81
5.4.00.0080.00511.81
5.3.290.0000.01111.81
5.3.280.0030.00511.81
5.3.270.0050.01011.81
5.3.260.0030.01311.81
5.3.250.0070.00411.81
5.3.240.0050.00511.81
5.3.230.0060.00311.81
5.3.220.0070.00011.81
5.3.210.0040.00411.81
5.3.200.0110.00411.81
5.3.190.0060.00311.81
5.3.180.0060.00311.81
5.3.170.0090.00011.81
5.3.160.0000.01011.81
5.3.150.0100.00011.81
5.3.140.0060.00611.81
5.3.130.0030.00611.81
5.3.120.0030.00611.81
5.3.110.0060.00611.81
5.3.100.0000.00911.81
5.3.90.0040.00811.81
5.3.80.0030.00611.81
5.3.70.0120.00011.81
5.3.60.0060.00311.81
5.3.50.0030.00711.81
5.3.40.0060.00311.81
5.3.30.0000.00911.81
5.3.20.0000.00711.81
5.3.10.0040.01211.81
5.3.00.0050.00611.81
5.2.170.0080.00511.81
5.2.160.0050.00511.81
5.2.150.0030.00811.81
5.2.140.0090.00011.81
5.2.130.0110.00011.81
5.2.120.0110.00011.81
5.2.110.0100.00711.81
5.2.100.0100.00711.81
5.2.90.0120.00311.81
5.2.80.0140.00311.81
5.2.70.0110.00011.81
5.2.60.0110.00011.81
5.2.50.0100.00311.81
5.2.40.0070.01111.81
5.2.30.0020.00711.81
5.2.20.0100.00211.81
5.2.10.0090.00011.81
5.2.00.0110.00011.81
5.1.60.0050.00811.81
5.1.50.0000.00911.81
5.1.40.0060.00311.81
5.1.30.0070.00711.81
5.1.20.0100.00711.81
5.1.10.0070.00511.81
5.1.00.0080.00411.81
5.0.50.0040.00411.81
5.0.40.0080.00511.81
5.0.30.0070.00211.81
5.0.20.0080.00511.81
5.0.10.0080.00011.81
5.0.00.0040.00411.81
4.4.90.0060.00011.81
4.4.80.0070.00011.81
4.4.70.0070.00011.81
4.4.60.0060.00011.81
4.4.50.0030.00311.81
4.4.40.0050.00311.81
4.4.30.0030.00511.81
4.4.20.0050.00511.81
4.4.10.0050.00011.81
4.4.00.0040.00211.81
4.3.110.0040.00411.81
4.3.100.0040.00711.81
4.3.90.0020.00411.81
4.3.80.0040.00211.81
4.3.70.0060.00011.81
4.3.60.0090.00311.81
4.3.50.0060.00311.81
4.3.40.0070.00311.81
4.3.30.0060.00011.81
4.3.20.0040.00211.81
4.3.10.0000.00811.81
4.3.00.0050.00711.81

preferences:
63.95 ms | 401 KiB | 5 Q