3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new \Datetime("2015-12-03"); $b = new \Datetime("2015-12-12"); print_r($b->diff($a)->format("%y - %m - %d")). "\n"; $now = new DateTime; $clone = clone $now; $clone->modify( '-1 day' ); echo $now->format( 'd-m-Y' ), "\n", $clone->format( 'd-m-Y' );

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.0000.01816.61
8.3.50.0150.00018.11
8.3.40.0110.00418.84
8.3.30.0130.00318.84
8.3.20.0030.00520.16
8.3.10.0070.00021.90
8.3.00.0000.00819.79
8.2.170.0000.01619.26
8.2.160.0080.00822.96
8.2.150.0050.00325.66
8.2.140.0080.00024.66
8.2.130.0080.00019.30
8.2.120.0000.00826.35
8.2.110.0100.00022.11
8.2.100.0060.00618.15
8.2.90.0050.00319.21
8.2.80.0050.00318.16
8.2.70.0000.00917.75
8.2.60.0000.00818.05
8.2.50.0040.00418.07
8.2.40.0030.00522.32
8.2.30.0030.00520.64
8.2.20.0000.00817.88
8.2.10.0040.00418.20
8.2.00.0040.00418.05
8.1.270.0040.00424.66
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0000.00923.96
8.1.230.0100.00318.95
8.1.220.0050.00317.74
8.1.210.0050.00518.77
8.1.200.0030.00617.48
8.1.190.0060.00317.38
8.1.180.0040.00418.10
8.1.170.0050.00318.67
8.1.160.0050.00220.87
8.1.150.0040.00418.94
8.1.140.0050.00319.73
8.1.130.0000.00717.84
8.1.120.0070.00017.57
8.1.110.0050.00217.61
8.1.100.0000.00717.66
8.1.90.0070.00317.73
8.1.80.0070.00017.73
8.1.70.0070.00017.67
8.1.60.0100.00017.67
8.1.50.0040.00417.61
8.1.40.0040.00417.74
8.1.30.0030.00517.73
8.1.20.0080.00017.88
8.1.10.0060.00317.74
8.1.00.0060.00317.78
8.0.300.0070.00018.77
8.0.290.0000.00816.88
8.0.280.0040.00418.66
8.0.270.0030.00317.42
8.0.260.0070.00017.41
8.0.250.0000.00717.08
8.0.240.0040.00417.24
8.0.230.0000.00717.27
8.0.220.0000.00717.14
8.0.210.0000.00717.18
8.0.200.0030.00317.23
8.0.190.0060.00317.24
8.0.180.0040.00417.21
8.0.170.0040.00417.23
8.0.160.0040.00417.08
8.0.150.0040.00417.07
8.0.140.0000.00917.02
8.0.130.0000.00513.53
8.0.120.0000.00717.02
8.0.110.0000.00817.00
8.0.100.0030.00517.14
8.0.90.0020.00517.01
8.0.80.0060.00817.09
8.0.70.0000.00717.24
8.0.60.0000.00816.98
8.0.50.0040.00417.18
8.0.30.0120.00917.36
8.0.20.0130.00517.44
8.0.10.0070.00017.30
8.0.00.0080.01217.00
7.4.330.0050.00016.77
7.4.320.0030.00316.74
7.4.300.0060.00016.75
7.4.290.0040.00416.52
7.4.280.0000.00816.67
7.4.270.0030.00316.66
7.4.260.0000.00716.79
7.4.250.0030.00516.63
7.4.240.0020.00516.74
7.4.230.0070.00016.87
7.4.220.0060.01216.68
7.4.210.0110.00316.71
7.4.200.0050.00316.74
7.4.160.0080.00816.57
7.4.150.0030.01417.40
7.4.140.0160.00617.86
7.4.130.0050.01316.67
7.4.120.0090.00916.62
7.4.110.0170.00316.66
7.4.100.0100.00716.74
7.4.90.0180.00616.62
7.4.80.0120.00619.39
7.4.70.0070.01016.63
7.4.60.0060.00916.77
7.4.50.0030.01016.55
7.4.40.0110.00716.61
7.4.30.0110.00716.69
7.4.00.0080.00814.99
7.3.330.0050.00013.31
7.3.320.0040.00413.31
7.3.310.0000.00716.53
7.3.300.0050.00216.38
7.3.290.0050.01116.49
7.3.280.0070.01116.48
7.3.270.0070.01017.40
7.3.260.0150.00916.69
7.3.250.0070.01216.49
7.3.240.0080.01016.57
7.3.230.0120.01216.54
7.3.210.0130.00316.60
7.3.200.0060.01016.69
7.3.190.0030.01316.70
7.3.180.0070.01116.57
7.3.170.0100.00716.61
7.3.160.0090.00616.53
7.2.330.0130.00316.94
7.2.320.0140.00316.57
7.2.310.0100.00716.63
7.2.300.0090.00916.57
7.2.290.0110.00716.83
7.2.60.0040.01217.17
7.2.00.0030.01019.45
7.1.200.0070.00715.99
7.1.100.0000.01118.39
7.1.70.0000.00817.36
7.1.60.0140.01119.52
7.1.50.0030.01417.14
7.1.00.0000.08022.28
7.0.200.0080.00016.89
7.0.60.0100.05320.05
7.0.50.0070.07317.88
7.0.40.0100.08320.07
7.0.30.0430.04020.04
7.0.20.0430.07320.16
7.0.10.0170.06720.00
7.0.00.0070.05320.01
5.6.280.0030.03321.04
5.6.210.0070.04720.46
5.6.200.0100.06018.19
5.6.190.0070.07020.43
5.6.180.0300.04020.43
5.6.170.0270.08020.50
5.6.160.0130.07720.51
5.6.150.0130.07718.11
5.6.140.0070.05318.18
5.6.130.0070.05718.21
5.6.120.0170.04321.14
5.6.110.0130.03321.14
5.6.100.0130.07021.02
5.6.90.0070.08021.10
5.6.80.0130.06720.28
5.5.350.0370.08020.38
5.5.340.0070.07317.92
5.5.330.0030.04020.29
5.5.320.0570.06320.27
5.5.310.0130.05720.17
5.5.300.0030.07717.89
5.5.290.0100.06717.98
5.5.280.0000.05720.86
5.5.270.0200.06020.95
5.5.260.0170.07720.75
5.5.250.0000.04320.57
5.5.240.4400.02720.06

preferences:
49.28 ms | 400 KiB | 5 Q