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 + 1, 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.0110.01118.43
8.3.50.0150.00716.26
8.3.40.0200.00318.82
8.3.30.0120.00319.05
8.3.20.0030.00521.86
8.3.10.0050.00323.63
8.3.00.0040.00417.88
8.2.180.0130.00718.66
8.2.170.0090.00622.96
8.2.160.0110.00421.21
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00420.55
8.2.120.0060.00326.35
8.2.110.0090.00022.21
8.2.100.0090.00319.95
8.2.90.0060.00319.34
8.2.80.0050.00318.00
8.2.70.0000.01118.00
8.2.60.0050.00318.16
8.2.50.0090.00019.52
8.2.40.0070.00020.71
8.2.30.0020.00519.36
8.2.20.0050.00318.19
8.2.10.0030.00618.16
8.2.00.0000.01018.36
8.1.280.0140.00725.92
8.1.270.0040.00423.95
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0030.00621.24
8.1.230.0070.00419.32
8.1.220.0040.00417.80
8.1.210.0030.00618.77
8.1.200.0060.00317.61
8.1.190.0030.00617.54
8.1.180.0040.00418.10
8.1.170.0000.00818.84
8.1.160.0040.00418.91
8.1.150.0000.00820.13
8.1.140.0080.00019.68
8.1.130.0000.00719.04
8.1.120.0050.00317.64
8.1.110.0030.00617.74
8.1.100.0050.00317.68
8.1.90.0000.00717.68
8.1.80.0000.00717.61
8.1.70.0040.00417.76
8.1.60.0040.00417.68
8.1.50.0040.00417.73
8.1.40.0040.00417.79
8.1.30.0030.00617.85
8.1.20.0000.00817.93
8.1.10.0000.00817.74
8.1.00.0080.00017.82
8.0.300.0020.00520.21
8.0.290.0040.00417.13
8.0.280.0030.00318.59
8.0.270.0030.00317.43
8.0.260.0000.00718.66
8.0.250.0030.00317.39
8.0.240.0030.00517.32
8.0.230.0030.00317.29
8.0.220.0000.00817.25
8.0.210.0000.00717.27
8.0.200.0000.00717.34
8.0.190.0000.00917.34
8.0.180.0090.00317.27
8.0.170.0040.00417.14
8.0.160.0000.00717.33
8.0.150.0040.00417.00
8.0.140.0050.00317.21
8.0.130.0030.00313.53
8.0.120.0000.00817.15
8.0.110.0000.00717.03
8.0.100.0030.00617.12
8.0.90.0000.00817.18
8.0.80.0110.01017.19
8.0.70.0000.00717.12
8.0.60.0040.00417.14
8.0.50.0040.00417.29
8.0.30.0120.00717.42
8.0.20.0130.00517.41
8.0.10.0050.00317.47
8.0.00.0110.00717.03
7.4.330.0000.00515.55
7.4.320.0040.00416.86
7.4.300.0000.00616.76
7.4.290.0030.00616.82
7.4.280.0030.00316.72
7.4.270.0000.00716.86
7.4.260.0060.00013.39
7.4.250.0000.00716.69
7.4.240.0000.00716.80
7.4.230.0070.00016.91
7.4.220.0140.00716.83
7.4.210.0080.00616.72
7.4.200.0000.00716.80
7.4.160.0100.00616.71
7.4.150.0140.00417.40
7.4.140.0090.01017.86
7.4.130.0120.00916.66
7.4.120.0110.00916.81
7.4.110.0100.00716.85
7.4.100.0090.00916.75
7.4.90.0080.01416.68
7.4.80.0040.02319.39
7.4.70.0100.00716.73
7.4.60.0130.00316.82
7.4.50.0090.00316.43
7.4.40.0030.01616.92
7.4.30.0100.00616.76
7.4.00.0110.00715.15
7.3.330.0000.00513.30
7.3.320.0060.00013.54
7.3.310.0030.00316.63
7.3.300.0070.00016.57
7.3.290.0030.01016.56
7.3.280.0100.00716.53
7.3.270.0090.01317.40
7.3.260.0100.00916.77
7.3.250.0090.01116.57
7.3.240.0090.00816.63
7.3.230.0150.00616.55
7.3.210.0060.01016.77
7.3.200.0100.01016.49
7.3.190.0070.01016.58
7.3.180.0090.00816.86
7.3.170.0120.00416.71
7.3.160.0120.00416.64
7.2.330.0110.00616.71
7.2.320.0200.00617.02
7.2.310.0130.01017.14
7.2.300.0140.00916.89
7.2.290.0180.00616.71
7.2.60.0100.00317.05
7.2.00.0000.01119.67
7.1.200.0040.00316.10
7.1.100.0080.00418.21
7.1.70.0050.00317.42
7.1.60.0800.01033.43
7.1.50.0530.01033.03
7.1.40.0630.01732.70
7.1.30.0530.01333.04
7.1.20.0700.01032.81
7.1.10.0330.01015.04
7.1.00.0330.00715.09
7.0.200.0570.01314.91
7.0.190.0530.01014.98
7.0.180.0530.01014.55
7.0.170.0430.01314.52
7.0.160.0430.01014.57
7.0.150.0300.01714.31
7.0.140.0370.00314.63
7.0.130.0400.01014.76
7.0.120.0330.01014.74
7.0.110.0370.01714.73
7.0.100.0370.00714.51
7.0.90.1000.01314.54
7.0.80.0430.00714.69
7.0.70.0430.01014.55
7.0.60.0470.01014.63
7.0.50.0400.01014.60
7.0.40.0400.01314.66
7.0.30.0630.01314.82
7.0.20.0530.01014.66
7.0.10.0500.00714.98
7.0.00.0800.01314.75

preferences:
62.05 ms | 401 KiB | 5 Q