3v4l.org

run code in 300+ PHP versions simultaneously
<?php // http://stackoverflow.com/questions/13128854/php-datetime-class-change-first-day-of-the-week-to-monday?rq=1 $test = new DateTime('2012-11-04'); // 2012-11-05 // I expect to get 2012-10-29 var_dump($test->modify('Monday this week')->format('Y-m-d')); setlocale(LC_ALL, 'nl_NL'); $test = new DateTime('2012-11-04'); // 2012-11-05 // I expect to get 2012-10-29 var_dump($test->modify('Monday this week')->format('Y-m-d'));

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.00618.81
8.3.60.0090.00918.81
8.3.50.0220.00321.26
8.3.40.0100.00519.13
8.3.30.0130.00719.23
8.3.20.0080.00020.62
8.3.10.0040.01422.27
8.3.00.0040.00423.93
8.2.190.0280.00416.88
8.2.180.0170.01018.66
8.2.170.0070.01122.96
8.2.160.0180.00320.94
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0070.00021.55
8.2.120.0050.00326.35
8.2.110.0060.00320.82
8.2.100.0080.00418.40
8.2.90.0040.00419.77
8.2.80.0060.00318.00
8.2.70.0100.00518.00
8.2.60.0080.00418.18
8.2.50.0110.00218.13
8.2.40.0120.00022.61
8.2.30.0030.00620.02
8.2.20.0070.00218.18
8.2.10.0030.00518.61
8.2.00.0040.00418.51
8.1.280.0070.01525.92
8.1.270.0130.00622.60
8.1.260.0150.00028.09
8.1.250.0080.00028.09
8.1.240.0060.00321.41
8.1.230.0060.00918.20
8.1.220.0000.00918.04
8.1.210.0050.00318.77
8.1.200.0070.00317.98
8.1.190.0030.00617.85
8.1.180.0000.00818.10
8.1.170.0090.00019.20
8.1.160.0000.00721.15
8.1.150.0150.00019.21
8.1.140.0000.00920.01
8.1.130.0070.00018.18
8.1.120.0000.01017.95
8.1.110.0090.00017.99
8.1.100.0040.00417.85
8.1.90.0030.00317.92
8.1.80.0100.00317.84
8.1.70.0070.00017.99
8.1.60.0030.00518.06
8.1.50.0070.00417.84
8.1.40.0150.00517.95
8.1.30.0000.00817.94
8.1.20.0040.00417.97
8.1.10.0000.00818.07
8.1.00.0020.00517.99
8.0.300.0000.00718.77
8.0.290.0030.00617.38
8.0.280.0000.00719.00
8.0.270.0070.00017.85
8.0.260.0000.00717.75
8.0.250.0000.00717.55
8.0.240.0030.00317.33
8.0.230.0040.00417.42
8.0.220.0030.00617.34
8.0.210.0030.00617.32
8.0.200.0000.01317.43
8.0.190.0100.00717.53
8.0.180.0070.00017.54
8.0.170.0040.00417.38
8.0.160.0000.00817.52
8.0.150.0070.00417.31
8.0.140.0000.00817.35
8.0.130.0000.00513.77
8.0.120.0000.00817.32
8.0.110.0030.00517.38
8.0.100.0040.00417.42
8.0.90.0000.00817.38
8.0.80.0170.01017.38
8.0.70.0070.00017.41
8.0.60.0050.00317.33
8.0.50.0050.00517.23
8.0.30.0160.00917.66
8.0.20.0070.01317.61
8.0.10.0030.00617.61
8.0.00.0120.00917.32
7.4.330.0060.00017.32
7.4.320.0000.00617.05
7.4.300.0000.00817.02
7.4.290.0090.00416.89
7.4.280.0060.00616.98
7.4.270.0040.00416.90
7.4.260.0030.00317.07
7.4.250.0050.00317.09
7.4.240.0000.00717.01
7.4.230.0050.00317.13
7.4.220.0230.00317.04
7.4.210.0060.01317.12
7.4.200.0030.00317.07
7.4.160.0140.00717.11
7.4.150.0110.01117.40
7.4.140.0260.01117.86
7.4.130.0240.01117.01
7.4.120.0150.00716.85
7.4.110.0050.01316.99
7.4.100.0060.01616.96
7.4.90.0070.01116.85
7.4.80.0210.00919.39
7.4.70.0070.01416.96
7.4.60.0100.01017.09
7.4.50.0060.00916.97
7.4.40.0090.00916.68
7.4.30.0090.01216.88
7.4.00.0070.00914.97
7.3.330.0150.00413.49
7.3.320.0100.00313.54
7.3.310.0040.00416.51
7.3.300.0000.00616.46
7.3.290.0170.00916.61
7.3.280.0190.00816.64
7.3.270.0140.00317.40
7.3.260.0060.01916.81
7.3.250.0150.00916.88
7.3.240.0160.00916.80
7.3.230.0260.00316.75
7.3.210.0100.00716.65
7.3.200.0090.00919.39
7.3.190.0220.00716.91
7.3.180.0110.01416.92
7.3.170.0170.00316.86
7.3.160.0170.00416.61
7.3.120.0130.00714.84
7.3.110.0120.00314.55
7.3.100.0040.00914.77
7.3.90.0040.00715.09
7.3.80.0050.00514.98
7.3.70.0000.01214.85
7.3.60.0050.00514.68
7.3.50.0090.00314.90
7.3.40.0050.00514.82
7.3.30.0000.01414.63
7.3.20.0090.00616.73
7.3.10.0110.00416.37
7.3.00.0040.00816.52
7.2.330.0090.00917.00
7.2.320.0110.01116.88
7.2.310.0030.02016.79
7.2.300.0100.00717.11
7.2.290.0130.01116.84
7.2.250.0030.01715.03
7.2.240.0060.01215.05
7.2.230.0030.00615.41
7.2.220.0050.00515.06
7.2.210.0000.00915.04
7.2.200.0100.00715.05
7.2.190.0040.01115.00
7.2.180.0060.00615.11
7.2.170.0060.00315.04
7.2.60.0080.00817.04
7.2.00.0000.01019.67
7.1.330.0030.01015.99
7.1.320.0060.00615.63
7.1.310.0030.00916.01
7.1.300.0090.00015.95
7.1.290.0030.00915.81
7.1.280.0040.01215.67
7.1.270.0040.00815.66
7.1.260.0000.01115.91
7.1.200.0040.00415.93
7.1.100.0040.00918.41
7.1.70.0000.00916.96
7.1.60.0150.00919.28
7.1.50.0070.01616.88
7.1.00.0030.06722.36
7.0.200.0030.00616.83
7.0.60.0000.08321.87
7.0.50.0000.08717.72
7.0.40.0130.06719.91
7.0.30.0400.07020.17
7.0.20.0370.07020.17
7.0.10.0000.05020.00
7.0.00.0100.08720.31
5.6.280.0070.04720.89
5.6.210.0030.09020.54
5.6.200.0000.06718.16
5.6.190.0070.06320.68
5.6.180.0100.04720.57
5.6.170.0100.04720.50
5.6.160.0070.05720.43
5.6.150.0000.06718.20
5.6.140.0070.08018.22
5.6.130.0070.07718.12
5.6.120.0030.04021.01
5.6.110.0170.06721.01
5.6.100.0000.08321.08
5.6.90.0070.07320.88
5.6.80.0030.08320.40
5.5.350.2900.03320.34
5.5.340.0000.07717.96
5.5.330.0070.04020.13
5.5.320.0300.05320.18
5.5.310.0370.04320.41
5.5.300.0030.07317.93
5.5.290.0070.06317.98
5.5.280.0130.07720.79
5.5.270.0070.05320.75
5.5.260.0130.06720.67
5.5.250.0100.07720.48
5.5.240.0200.06320.34

preferences:
39.29 ms | 401 KiB | 5 Q