3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Demo { public function __construct(DateTimeInterface $dateTime) { $this->date = clone $dateTime; } public function getDateTime(): DateTimeInterface { return clone $this->date; } public function echo() { echo $this->date->format("d/m/Y h:i:s"); } } $demo = new Demo(new DateTime()); $demo->echo()."<br>"; $demo->getDateTime()->add(new DateInterval('P1D')); $demo->echo();

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.0170.00318.80
8.3.50.0090.00618.44
8.3.40.0110.00719.18
8.3.30.0170.00018.95
8.3.20.0040.00419.27
8.3.10.0050.00321.73
8.3.00.0000.00720.56
8.2.180.0070.00716.63
8.2.170.0110.00722.96
8.2.160.0000.01621.99
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0100.00019.95
8.2.120.0070.00326.35
8.2.110.0100.00020.99
8.2.100.0080.00318.03
8.2.90.0040.00417.88
8.2.80.0080.00017.97
8.2.70.0000.00818.16
8.2.60.0050.00318.34
8.2.50.0030.00618.10
8.2.40.0030.00519.20
8.2.30.0060.00319.38
8.2.20.0000.00718.19
8.2.10.0040.00418.11
8.2.00.0040.00417.77
8.1.280.0110.00425.92
8.1.270.0040.00419.05
8.1.260.0040.00426.35
8.1.250.0040.01128.09
8.1.240.0090.00022.11
8.1.230.0070.00717.60
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.60
8.1.190.0090.00017.48
8.1.180.0000.00718.10
8.1.170.0000.00918.63
8.1.160.0060.00318.83
8.1.150.0000.00819.00
8.1.140.0070.00022.14
8.1.130.0030.00320.31
8.1.120.0070.00017.69
8.1.110.0020.00517.57
8.1.100.0000.00717.69
8.1.90.0070.00017.64
8.1.80.0040.00417.69
8.1.70.0040.00417.68
8.1.60.0000.00817.57
8.1.50.0000.00817.63
8.1.40.0040.00417.67
8.1.30.0030.00617.73
8.1.20.0030.00617.74
8.1.10.0040.00417.68
8.1.00.0000.00917.71
8.0.300.0070.00018.77
8.0.290.0040.00417.00
8.0.280.0050.00318.52
8.0.270.0040.00417.21
8.0.260.0000.00718.52
8.0.250.0070.00317.21
8.0.240.0070.00017.18
8.0.230.0070.00017.23
8.0.220.0100.00017.03
8.0.210.0040.00417.12
8.0.200.0030.00717.11
8.0.190.0040.00417.21
8.0.180.0030.00517.08
8.0.170.0000.00817.21
8.0.160.0050.00317.18
8.0.150.0030.00417.01
8.0.140.0030.00317.11
8.0.130.0080.00013.55
8.0.120.0030.00517.14
8.0.110.0040.00417.10
8.0.100.0000.00717.05
8.0.90.0000.00717.14
8.0.80.0080.00917.12
8.0.70.0030.00517.03
8.0.60.0000.00717.07
8.0.50.0000.00817.00
8.0.30.0060.01317.26
8.0.20.0100.00817.51
8.0.10.0000.00717.23
8.0.00.0130.00816.85
7.4.330.0020.00215.55
7.4.320.0000.00716.60
7.4.300.0030.00316.65
7.4.290.0030.00316.75
7.4.280.0000.01016.56
7.4.270.0000.00716.64
7.4.260.0000.00716.56
7.4.250.0000.00816.61
7.4.240.0030.00316.70
7.4.230.0000.00716.54
7.4.220.0000.00716.45
7.4.210.0080.00716.76
7.4.200.0000.00716.75
7.4.160.0090.00816.69
7.4.140.0080.01017.86
7.4.130.0070.01016.88
7.4.120.0140.00716.65
7.4.110.0110.01116.84
7.4.100.0060.01216.77
7.4.90.0030.01416.70
7.4.80.0130.00719.39
7.4.70.0080.01216.66
7.4.60.0060.01016.73
7.4.50.0060.00616.56
7.4.40.0030.01616.80
7.4.00.0030.01015.07
7.3.330.0030.00313.41
7.3.320.0060.00013.36
7.3.310.0060.00316.34
7.3.300.0030.00316.49
7.3.290.0030.00316.36
7.3.280.0090.00616.46
7.3.260.0100.01216.51
7.3.240.0110.00716.73
7.3.230.0030.01316.67
7.3.210.0070.01016.59
7.3.200.0140.00316.59
7.3.190.0140.00716.76
7.3.180.0220.00016.70
7.3.170.0130.01016.64
7.3.160.0060.01016.54
7.2.330.0030.01416.59
7.2.320.0190.00616.96
7.2.310.0030.01317.01
7.2.300.0120.00616.97
7.2.290.0140.00316.62
7.2.110.0030.01016.80
7.2.100.0120.00316.73
7.2.90.0140.00016.84
7.2.80.0040.01116.71
7.2.70.0100.00717.16
7.2.60.0060.00917.07
7.2.50.0110.00416.91
7.2.40.0030.01417.10
7.2.30.0080.00716.84
7.2.20.0060.00617.10
7.2.10.0000.01516.89
7.2.00.0090.00617.07
7.1.230.0030.00815.82
7.1.220.0090.00615.77
7.1.210.0030.01015.73
7.1.200.0070.00715.84
7.1.190.0060.00915.92
7.1.180.0090.00315.59
7.1.170.0090.00315.86
7.1.160.0040.01115.87
7.1.150.0030.01115.71
7.1.140.0060.00615.46
7.1.130.0070.00715.87
7.1.120.0000.01515.95
7.1.110.0000.01515.64
7.1.100.0060.00915.57
7.1.90.0030.01015.73
7.1.80.0110.00316.00
7.1.70.0050.00615.73
7.1.60.0160.01633.95
7.1.50.0230.00733.52
7.1.40.0280.00333.88
7.1.30.0230.01333.65
7.1.20.0280.00433.89
7.1.10.0040.00815.92
7.1.00.0040.00915.65
5.6.380.0110.00313.91

preferences:
59.74 ms | 400 KiB | 5 Q