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 echo $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.0180.00418.30
8.3.60.0120.00918.51
8.3.50.0100.01021.28
8.3.40.0070.00718.58
8.3.30.0090.00918.79
8.3.20.0040.00420.21
8.3.10.0090.00023.61
8.3.00.0050.00323.58
8.2.190.0070.01116.88
8.2.180.0150.00018.24
8.2.170.0070.01122.96
8.2.160.0070.00720.35
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0070.00021.00
8.2.120.0000.00826.35
8.2.110.0070.00320.83
8.2.100.0040.00818.16
8.2.90.0040.00419.41
8.2.80.0030.00517.97
8.2.70.0040.00417.75
8.2.60.0060.00318.17
8.2.50.0000.00918.09
8.2.40.0080.00022.31
8.2.30.0030.00519.66
8.2.20.0040.00417.98
8.2.10.0000.00718.18
8.2.00.0000.00818.09
8.1.280.0120.00325.92
8.1.270.0070.00722.27
8.1.260.0000.00728.09
8.1.250.0050.00228.09
8.1.240.0090.00022.51
8.1.230.0080.00417.83
8.1.220.0000.00917.74
8.1.210.0060.00318.77
8.1.200.0060.00317.48
8.1.190.0050.00317.47
8.1.180.0000.00818.10
8.1.170.0040.00418.77
8.1.160.0040.00420.81
8.1.150.0040.00418.81
8.1.140.0080.00019.68
8.1.130.0000.00717.75
8.1.120.0000.00717.58
8.1.110.0070.00017.54
8.1.100.0000.00717.68
8.1.90.0050.00217.47
8.1.80.0070.00017.61
8.1.70.0000.00717.63
8.1.60.0050.00217.60
8.1.50.0000.00817.65
8.1.40.0080.00017.58
8.1.30.0050.00317.77
8.1.20.0060.00317.67
8.1.10.0030.00517.75
8.1.00.0040.00417.61
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0040.00418.62
8.0.270.0030.00317.30
8.0.260.0030.00317.43
8.0.250.0070.00017.24
8.0.240.0000.00717.11
8.0.230.0050.00317.14
8.0.220.0000.00716.97
8.0.210.0050.00317.07
8.0.200.0040.00417.12
8.0.190.0050.00317.18
8.0.180.0000.00717.03
8.0.170.0070.00016.99
8.0.160.0030.00317.04
8.0.150.0000.00817.04
8.0.140.0060.00317.06
8.0.130.0000.00613.43
8.0.120.0030.00516.97
8.0.110.0060.00316.90
8.0.100.0070.00016.97
8.0.90.0040.00416.99
8.0.80.0040.01117.11
8.0.70.0000.00817.03
8.0.60.0070.00016.97
8.0.50.0050.00316.98
8.0.30.0110.01017.41
8.0.20.0120.00917.41
8.0.10.0040.00417.10
8.0.00.0120.01117.02
7.4.330.0030.00316.84
7.4.320.0030.00316.74
7.4.300.0000.00816.68
7.4.290.0030.00316.65
7.4.280.0000.00716.57
7.4.270.0000.00716.56
7.4.260.0000.00716.75
7.4.250.0040.00416.61
7.4.240.0080.00016.56
7.4.230.0030.00316.52
7.4.220.0060.01016.68
7.4.210.0100.01316.59
7.4.200.0030.00316.81
7.4.160.0140.00716.55
7.4.150.0110.00817.40
7.4.140.0130.00917.86
7.4.130.0100.01016.79
7.4.120.0100.00716.67
7.4.110.0070.01016.67
7.4.100.0100.01016.65
7.4.90.0120.00616.61
7.4.80.0130.00919.39
7.4.70.0090.00916.64
7.4.60.0140.00716.61
7.4.50.0080.00316.73
7.4.40.0070.01016.58
7.4.30.0060.01616.62
7.4.00.0060.00915.43
7.3.330.0030.00313.14
7.3.320.0060.00013.25
7.3.310.0050.00216.29
7.3.300.0030.00316.22
7.3.290.0040.01316.33
7.3.280.0120.00616.33
7.3.270.0000.01717.40
7.3.260.0130.00316.54
7.3.250.0100.00916.50
7.3.240.0120.00816.63
7.3.230.0060.01116.55
7.3.210.0060.01016.39
7.3.200.0100.00719.39
7.3.190.0000.01616.68
7.3.180.0080.00916.65
7.3.170.0040.01316.64
7.3.160.0110.00516.77
7.2.330.0090.01616.63
7.2.320.0060.01316.84
7.2.310.0090.00916.84
7.2.300.0060.01616.64
7.2.290.0140.00916.73
7.2.60.0040.01116.87
7.2.00.0030.00619.66
7.1.200.0200.00815.62
7.1.100.0040.00718.27
7.1.70.0040.00417.38
7.1.60.0070.01719.28
7.1.50.0040.01916.75
7.1.00.0070.07322.54
7.0.200.0030.00616.83
7.0.60.0100.07721.84
7.0.50.0130.07017.79
7.0.40.0070.05020.08
7.0.30.0230.08020.21
7.0.20.0300.07020.02
7.0.10.0030.04720.04
7.0.00.0100.07320.09
5.6.280.0000.04720.80
5.6.210.0130.03320.66
5.6.200.0100.03718.18
5.6.190.0100.07720.61
5.6.180.0300.07020.45
5.6.170.0230.04020.50
5.6.160.0070.08320.33
5.6.150.0000.05318.22
5.6.140.0030.08318.20
5.6.130.0030.05318.11
5.6.120.0070.05021.12
5.6.110.0070.08721.11
5.6.100.0170.07020.91
5.6.90.0070.04020.92
5.6.80.0100.03320.43
5.5.350.2770.04320.41
5.5.340.0000.07317.91
5.5.330.0030.08720.21
5.5.320.0470.04020.21
5.5.310.0400.05020.23
5.5.300.0030.04017.99
5.5.290.0070.08718.01
5.5.280.0100.07320.68
5.5.270.0070.05320.96
5.5.260.0100.08020.97
5.5.250.0030.08320.70
5.5.240.0070.06020.28

preferences:
62.97 ms | 401 KiB | 5 Q