3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime( '2016-08-25' ); echo $date->format('Y-m-d'),"\n"; $day = $date->format('j'); $date->modify('first day of sixth month'); $date->modify('+' . (min($day, $date->format('t')) - 1) . ' days'); echo $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.4.20.0060.01517.74
8.4.10.0060.00319.43
8.3.150.0060.01217.11
8.3.140.0080.00018.81
8.3.130.0080.00018.71
8.3.120.0070.00418.80
8.3.110.0070.00420.94
8.3.100.0070.00716.79
8.3.90.0070.00026.77
8.3.80.0030.00619.36
8.3.70.0030.01716.75
8.3.60.0070.01116.88
8.3.50.0140.00522.06
8.3.40.0120.00318.83
8.3.30.0030.01318.93
8.3.20.0080.00019.15
8.3.10.0080.00023.65
8.3.00.0040.00422.39
8.2.260.0060.01219.22
8.2.250.0040.00418.60
8.2.240.0060.00317.26
8.2.230.0070.00322.58
8.2.220.0050.00524.06
8.2.210.0000.00826.77
8.2.200.0090.00018.88
8.2.190.0040.01116.78
8.2.180.0090.00618.66
8.2.170.0060.00919.16
8.2.160.0070.00722.96
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00019.89
8.2.110.0000.00919.51
8.2.100.0080.00417.97
8.2.90.0060.00319.20
8.2.80.0050.00317.97
8.2.70.0000.00817.88
8.2.60.0000.00818.16
8.2.50.0040.00418.10
8.2.40.0000.00822.27
8.2.30.0040.00419.43
8.2.20.0040.00418.01
8.2.10.0020.00518.15
8.2.00.0000.00817.95
8.1.310.0100.00717.06
8.1.300.0000.00817.86
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0070.00024.01
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00719.50
8.1.230.0040.00721.06
8.1.220.0000.00917.77
8.1.210.0050.00318.77
8.1.200.0060.00317.60
8.1.190.0040.00417.38
8.1.180.0000.00818.10
8.1.170.0080.00018.77
8.1.160.0070.00322.24
8.1.150.0070.00018.93
8.1.140.0060.00319.75
8.1.130.0040.00417.75
8.1.120.0000.00717.62
8.1.110.0070.00017.55
8.1.100.0000.00817.71
8.1.90.0070.00017.69
8.1.80.0040.00417.77
8.1.70.0030.00317.74
8.1.60.0040.00417.81
8.1.50.0030.00617.67
8.1.40.0030.00517.73
8.1.30.0040.00417.80
8.1.20.0030.00617.76
8.1.10.0000.00717.80
8.1.00.0060.00317.65
8.0.300.0030.00618.77
8.0.290.0040.00417.00
8.0.280.0070.00018.49
8.0.270.0030.00317.32
8.0.260.0030.00317.05
8.0.250.0070.00017.14
8.0.240.0040.00417.16
8.0.230.0040.00417.18
8.0.220.0030.00317.21
8.0.210.0050.00317.14
8.0.200.0000.00817.23
8.0.190.0040.00417.29
8.0.180.0000.00717.22
8.0.170.0030.00617.29
8.0.160.0040.00417.23
8.0.150.0000.00717.13
8.0.140.0070.00017.07
8.0.130.0000.00513.63
8.0.120.0070.00017.13
8.0.110.0040.00417.25
8.0.100.0040.00417.23
8.0.90.0050.00317.10
8.0.80.0040.01117.20
8.0.70.0070.00017.04
8.0.60.0000.00717.02
8.0.50.0000.00716.99
8.0.30.0060.01217.29
8.0.20.0090.01017.44
8.0.10.0040.00417.24
8.0.00.0100.00716.97
7.4.330.0020.00215.11
7.4.320.0060.00016.64
7.4.300.0030.00316.50
7.4.290.0030.00316.58
7.4.280.0040.00416.61
7.4.270.0030.00316.63
7.4.260.0050.00316.65
7.4.250.0030.00516.59
7.4.240.0040.00416.65
7.4.230.0000.00816.71
7.4.220.0140.00416.71
7.4.210.0160.00316.71
7.4.200.0050.00216.80
7.4.160.0050.01116.64
7.4.150.0120.00917.40
7.4.140.0110.00717.86
7.4.130.0070.01216.66
7.4.120.0150.00216.71
7.4.110.0000.01716.62
7.4.100.0100.01316.71
7.4.90.0130.00916.68
7.4.80.0100.00719.39
7.4.70.0120.01016.69
7.4.60.0090.00616.73
7.4.50.0140.00416.57
7.4.40.0100.00716.72
7.4.30.0000.02116.80
7.4.00.0030.01215.22
7.3.330.0000.00513.30
7.3.320.0060.00013.14
7.3.310.0050.00216.43
7.3.300.0080.00016.31
7.3.290.0070.00716.40
7.3.280.0080.00916.40
7.3.270.0060.01517.40
7.3.260.0110.00616.69
7.3.250.0110.00816.47
7.3.240.0120.00716.54
7.3.230.0050.01116.68
7.3.210.0030.01316.66
7.3.200.0100.00716.70
7.3.190.0060.00916.41
7.3.180.0140.00616.55
7.3.170.0070.01016.67
7.3.160.0120.00616.47
7.2.330.0070.01016.89
7.2.320.0100.01016.73
7.2.310.0090.00916.91
7.2.300.0110.01416.78
7.2.290.0120.00917.00
7.2.60.0030.00817.22
7.2.00.0030.01319.77
7.1.200.0060.00316.03
7.1.70.0030.00717.34
7.1.60.0040.00717.17
7.1.00.0030.07722.36
7.0.200.0060.00314.94
7.0.100.0070.05719.91
7.0.90.0100.05720.04
7.0.80.0100.05720.05
7.0.70.0100.05720.05
7.0.60.0200.04320.00
7.0.50.0100.06020.36
7.0.40.0200.04720.21
7.0.30.0170.05020.31
7.0.20.0170.05020.34
7.0.10.0130.05320.30
7.0.00.0170.05020.23
5.6.250.0070.05720.74
5.6.240.0070.06020.75
5.6.230.0070.05720.66
5.6.220.0100.05320.47
5.6.210.0130.05020.56
5.6.200.0170.05321.20
5.6.190.0070.06721.12
5.6.180.0030.06021.11
5.6.170.0070.05721.08
5.6.160.0000.06321.13
5.6.150.0130.05321.06
5.6.140.0100.05321.07
5.6.130.0030.06021.05
5.6.120.0130.05721.07
5.6.110.0100.06021.00
5.6.100.0170.05021.00
5.6.90.0170.05021.04
5.6.80.0130.05320.46
5.6.70.0030.06020.43
5.6.60.0030.06320.38
5.6.50.0100.05320.39
5.6.40.0000.06320.52
5.6.30.0130.05020.46
5.6.20.0100.05320.52
5.6.10.0270.05020.45
5.6.00.0100.08020.41

preferences:
62.16 ms | 403 KiB | 5 Q