3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Demo { public function __construct(DateTimeInterface $dateTime) { $this->date = $dateTime; } public function getDateTime(): DateTimeInterface { return $this->date; } public function echo() { echo $this->date->format("d/m/Y h:i:s"); } } $demo = new Demo(new DateTime()); $demo->echo()."\n"; $demo->getDateTime()->add(new DateTimeInterval('+1D')); $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.0120.00618.56
8.3.50.0160.00018.49
8.3.40.0070.01019.08
8.3.30.0070.00719.18
8.3.20.0080.00019.25
8.3.10.0050.00323.54
8.3.00.0080.00020.58
8.2.180.0080.00818.42
8.2.170.0040.01122.96
8.2.160.0110.00322.00
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00418.16
8.2.120.0040.00426.35
8.2.110.0090.00022.08
8.2.100.0070.00418.03
8.2.90.0040.00417.75
8.2.80.0060.00317.97
8.2.70.0040.00418.16
8.2.60.0030.00618.28
8.2.50.0030.00518.10
8.2.40.0030.00619.30
8.2.30.0080.00019.21
8.2.20.0040.00418.13
8.2.10.0070.00018.08
8.2.00.0100.00017.79
8.1.280.0060.00925.92
8.1.270.0050.00319.00
8.1.260.0070.01326.35
8.1.250.0100.01028.09
8.1.240.0030.00623.97
8.1.230.0070.00717.48
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0030.00617.60
8.1.190.0030.00617.38
8.1.180.0060.00318.10
8.1.170.0050.00318.72
8.1.160.0000.00719.00
8.1.150.0000.00718.96
8.1.140.0000.00722.20
8.1.130.0020.00520.22
8.1.120.0040.00417.57
8.1.110.0000.00717.62
8.1.100.0000.00717.64
8.1.90.0000.00717.70
8.1.80.0040.00417.65
8.1.70.0030.00317.59
8.1.60.0000.00817.65
8.1.50.0040.00417.66
8.1.40.0000.00817.65
8.1.30.0040.00417.66
8.1.20.0000.00817.77
8.1.10.0030.00517.65
8.1.00.0070.00017.75
8.0.300.0040.00418.77
8.0.290.0030.00516.98
8.0.280.0070.00018.55
8.0.270.0040.00417.36
8.0.260.0060.00018.47
8.0.250.0000.00817.24
8.0.240.0070.00017.27
8.0.230.0030.00317.23
8.0.220.0080.00417.13
8.0.210.0000.00817.18
8.0.200.0030.00717.13
8.0.190.0000.01017.14
8.0.180.0000.00917.20
8.0.170.0040.00417.11
8.0.160.0020.00517.20
8.0.150.0030.00816.97
8.0.140.0050.00217.12
8.0.130.0030.00313.57
8.0.120.0030.00617.04
8.0.110.0000.00717.19
8.0.100.0000.00717.19
8.0.90.0000.00717.13
8.0.80.0030.01417.08
8.0.70.0030.00617.04
8.0.60.0000.00717.16
8.0.50.0050.00217.09
8.0.30.0040.01517.54
8.0.20.0110.01017.41
8.0.10.0020.00517.22
8.0.00.0080.01016.83
7.4.330.0030.00215.55
7.4.320.0060.00016.61
7.4.300.0000.00716.66
7.4.290.0080.00016.72
7.4.280.0000.00716.61
7.4.270.0070.00016.60
7.4.260.0100.00016.74
7.4.250.0070.00016.57
7.4.240.0040.00416.65
7.4.230.0040.00416.86
7.4.220.0030.00516.73
7.4.210.0030.01216.74
7.4.200.0030.00316.83
7.4.160.0080.00816.68
7.4.140.0100.01017.86
7.4.130.0110.00716.61
7.4.120.0100.01116.86
7.4.110.0160.00316.74
7.4.100.0100.00716.86
7.4.90.0090.00916.77
7.4.80.0100.00719.39
7.4.70.0100.00616.75
7.4.60.0070.01016.73
7.4.50.0130.00316.93
7.4.40.0120.00616.72
7.4.00.0050.01215.09
7.3.330.0050.00013.50
7.3.320.0030.00313.45
7.3.310.0000.00816.52
7.3.300.0040.00416.55
7.3.290.0000.00716.55
7.3.280.0060.00916.45
7.3.260.0120.00716.63
7.3.240.0110.00616.53
7.3.230.0070.01016.65
7.3.210.0100.00616.84
7.3.200.0000.01716.68
7.3.190.0150.00916.59
7.3.180.0130.00616.56
7.3.170.0080.01516.64
7.3.160.0070.00916.51
7.3.120.0090.00614.95
7.3.110.0110.00715.11
7.3.100.0060.00914.98
7.3.90.0060.01314.66
7.3.80.0100.00715.28
7.3.70.0070.00315.11
7.3.60.0070.00714.95
7.3.50.0090.00614.95
7.3.40.0040.00715.05
7.3.30.0000.01315.07
7.3.20.0090.00316.94
7.3.10.0140.00316.74
7.3.00.0090.00416.51
7.2.330.0140.00416.54
7.2.320.0130.00616.96
7.2.310.0040.01216.91
7.2.300.0070.01016.57
7.2.290.0100.01016.57
7.2.250.0080.01215.23
7.2.240.0070.01415.43
7.2.230.0090.00615.47
7.2.220.0070.00715.23
7.2.210.0040.01215.23
7.2.200.0040.00715.34
7.2.190.0090.00615.26
7.2.180.0070.00415.32
7.2.170.0030.01415.37
7.2.130.0120.00316.93
7.2.120.0100.00716.54
7.2.110.0110.00316.86
7.2.100.0090.00916.71
7.2.90.0130.00716.95
7.2.80.0150.00316.59
7.2.70.0100.00716.93
7.2.60.0060.01416.98
7.2.50.0030.01216.73
7.2.40.0150.00617.00
7.2.30.0130.00516.79
7.2.20.0120.00416.92
7.2.10.0060.00816.87
7.2.00.0070.00717.23
7.1.330.0030.01315.72
7.1.320.0040.00715.94
7.1.310.0030.00615.80
7.1.300.0090.00615.95
7.1.290.0060.00315.93
7.1.280.0070.00715.60
7.1.270.0090.00616.02
7.1.260.0030.01216.00
7.1.250.0140.00315.40
7.1.230.0030.01015.83
7.1.220.0030.00915.84
7.1.210.0110.00415.91
7.1.200.0100.00315.89
7.1.190.0070.00715.82
7.1.180.0070.00415.75
7.1.170.0080.00815.70
7.1.160.0030.01515.98
7.1.150.0000.01315.68
7.1.140.0060.00615.80
7.1.130.0070.00715.71
7.1.120.0060.00615.61
7.1.110.0060.00615.87
7.1.100.0030.00915.98
7.1.90.0070.01015.90
7.1.80.0130.00315.62
7.1.70.0060.01015.80
7.1.60.0290.00733.74
7.1.50.0250.00733.74
7.1.40.0190.01233.91
7.1.30.0300.00333.75
7.1.20.0220.01233.80
7.1.10.0030.01015.76
7.1.00.0070.00715.65
5.6.380.0060.01014.04

preferences:
66.3 ms | 401 KiB | 5 Q