3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('2017-06-28'); var_dump($date->format('Y-m-d')); $test = floor(1 / 3); var_dump($test); $date->setDate($date->format('Y'), floor(($date->format('m')-1) / 3) * 3 + 2, 1); var_dump($date->format('Y-m-d')); $date = clone($date); $date->modify('+3 month -1 day'); var_dump($date->format('Y-m-d')); $date->setDate($date->format('Y'), 1, 1); var_dump($date->format('Y-m-d')); $date->setDate($date->format('Y'), 12, 31); var_dump($date->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.60.0190.00018.68
8.3.50.0100.00716.28
8.3.40.0160.00619.08
8.3.30.0120.00318.85
8.3.20.0070.00022.03
8.3.10.0080.00023.64
8.3.00.0040.00418.01
8.2.180.0120.00918.79
8.2.170.0060.00922.96
8.2.160.0100.00321.19
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0070.00020.64
8.2.120.0000.00826.35
8.2.110.0060.00322.38
8.2.100.0060.00618.22
8.2.90.0030.00619.29
8.2.80.0000.00818.12
8.2.70.0080.00017.88
8.2.60.0090.00018.16
8.2.50.0080.00018.15
8.2.40.0060.00320.72
8.2.30.0030.00619.34
8.2.20.0050.00218.25
8.2.10.0000.00718.24
8.2.00.0000.00918.25
8.1.280.0090.00625.92
8.1.270.0060.00324.14
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00421.31
8.1.230.0110.00019.22
8.1.220.0090.00017.80
8.1.210.0030.00618.77
8.1.200.0030.00617.73
8.1.190.0040.00417.54
8.1.180.0000.00818.10
8.1.170.0060.00318.90
8.1.160.0080.00018.94
8.1.150.0040.00420.22
8.1.140.0000.00819.73
8.1.130.0030.00319.03
8.1.120.0000.00717.64
8.1.110.0000.00817.75
8.1.100.0020.00517.63
8.1.90.0030.00517.75
8.1.80.0020.00517.69
8.1.70.0030.00317.67
8.1.60.0040.00417.67
8.1.50.0040.00417.69
8.1.40.0050.00317.71
8.1.30.0080.00017.98
8.1.20.0000.00817.81
8.1.10.0000.00817.86
8.1.00.0000.00817.79
8.0.300.0070.00020.23
8.0.290.0040.00417.00
8.0.280.0070.00018.57
8.0.270.0000.00717.46
8.0.260.0030.00318.55
8.0.250.0030.00317.37
8.0.240.0070.00417.36
8.0.230.0000.00717.30
8.0.220.0000.00717.18
8.0.210.0000.00717.20
8.0.200.0030.00317.18
8.0.190.0030.00617.27
8.0.180.0050.00417.23
8.0.170.0040.00417.17
8.0.160.0000.00717.32
8.0.150.0000.00717.22
8.0.140.0000.00717.25
8.0.130.0050.00013.60
8.0.120.0040.00417.20
8.0.110.0030.00517.26
8.0.100.0040.00417.27
8.0.90.0000.00817.15
8.0.80.0060.01517.21
8.0.70.0000.00817.20
8.0.60.0080.00017.23
8.0.50.0050.00217.34
8.0.30.0150.00217.40
8.0.20.0080.01017.47
8.0.10.0000.00717.30
8.0.00.0060.01217.11
7.4.330.0050.00215.55
7.4.320.0060.00016.83
7.4.300.0030.00316.61
7.4.290.0080.00316.71
7.4.280.0070.00016.70
7.4.270.0070.00016.71
7.4.260.0050.00013.39
7.4.250.0030.00516.82
7.4.240.0040.00416.74
7.4.230.0040.00416.89
7.4.220.0110.00716.78
7.4.210.0030.01616.77
7.4.200.0000.00716.90
7.4.160.0080.01016.70
7.4.150.0040.01417.40
7.4.140.0120.00717.86
7.4.130.0100.01316.66
7.4.120.0110.00716.74
7.4.110.0110.00616.77
7.4.100.0050.01316.60
7.4.90.0140.00316.85
7.4.80.0140.00319.39
7.4.70.0130.00316.81
7.4.60.0080.00916.75
7.4.50.0040.01516.91
7.4.40.0140.00316.63
7.4.30.0080.00816.84
7.4.00.0030.01415.34
7.3.330.0030.00313.38
7.3.320.0000.00513.25
7.3.310.0000.00716.61
7.3.300.0040.00416.57
7.3.290.0050.01116.56
7.3.280.0080.00916.52
7.3.270.0160.00317.40
7.3.260.0080.01216.68
7.3.250.0160.00716.62
7.3.240.0070.01016.67
7.3.230.0090.00916.52
7.3.210.0130.00316.57
7.3.200.0040.01216.63
7.3.190.0090.00916.71
7.3.180.0090.00616.69
7.3.170.0090.00816.70
7.3.160.0060.00916.54
7.3.120.0030.01314.97
7.3.110.0120.00614.96
7.3.100.0000.01414.83
7.3.90.0060.00614.92
7.3.80.0090.00614.98
7.3.70.0060.01014.81
7.3.60.0060.00914.77
7.3.50.0070.01114.73
7.3.40.0090.00615.06
7.3.30.0080.00814.88
7.3.20.0040.01116.79
7.3.10.0080.00516.54
7.3.00.0070.00816.44
7.2.330.0040.01216.52
7.2.320.0070.01817.01
7.2.310.0100.00717.03
7.2.300.0100.00716.70
7.2.290.0130.01016.79
7.2.240.0060.00915.43
7.2.230.0050.00615.02
7.2.220.0130.00315.29
7.2.210.0060.00915.21
7.2.200.0030.01314.97
7.2.190.0000.01615.07
7.2.180.0030.01315.20
7.2.170.0060.01214.91
7.2.160.0060.00914.88
7.2.150.0100.00716.79
7.2.140.0030.01016.74
7.2.130.0070.00916.97
7.2.120.0040.00917.00
7.2.110.0040.00917.04
7.2.100.0070.00917.00
7.2.90.0020.01417.06
7.2.80.0070.01016.93
7.2.70.0050.00817.18
7.2.60.0030.01117.07
7.2.50.0070.00717.11
7.2.40.0090.00816.88
7.2.30.0110.00617.22
7.2.20.0080.00917.08
7.2.10.0070.00916.76
7.2.00.0070.01117.09
7.1.330.0090.00616.03
7.1.320.0100.00715.95
7.1.310.0100.00615.53
7.1.300.0030.01415.74
7.1.290.0040.00815.94
7.1.280.0070.00716.03
7.1.270.0000.01515.95
7.1.260.0070.00715.70
7.1.250.0070.00715.91
7.1.200.0060.00315.93
7.1.70.0090.00317.47
7.1.60.0470.01333.53
7.1.50.0400.02333.23
7.1.40.0570.00732.73
7.1.30.0570.01032.92
7.1.20.0430.01333.10
7.1.10.0330.01314.86
7.1.00.0530.00715.24
7.0.200.0470.00715.26
7.0.190.0500.01715.07
7.0.180.0400.01314.48
7.0.170.0330.01314.54
7.0.160.0370.01014.52
7.0.150.0330.01014.51
7.0.140.0470.00714.55
7.0.130.0330.01014.94
7.0.120.0330.00714.85
7.0.110.0300.01014.76
7.0.100.0270.01714.61
7.0.90.0470.00714.77
7.0.80.0400.01014.81
7.0.70.0900.01014.75
7.0.60.0300.01014.42
7.0.50.0270.01014.74
7.0.40.0300.00714.86
7.0.30.0270.01014.87
7.0.20.0370.01314.77
7.0.10.0600.00714.51
7.0.00.0600.00714.84

preferences:
55.01 ms | 400 KiB | 5 Q