3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface UriInterface { /** * @return self */ public function withHost($value); } interface Uri2Interface { public function withHost(string $value) : self; } class UriImplementingV1UsingTypeHintsFromV2 implements UriInterface { private $host; public function withHost(string $value) : self { $clone = clone $this; $clone->host = $value; return $clone; } } class UriImplementingV2WithoutTypeHints implements Uri2Interface { private $host; public function withHost($value) { $clone = clone $this; $clone->host = $value; return $clone; } }

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.120.0100.01020.69
8.4.110.0130.00718.98
8.4.100.0120.01217.60
8.4.90.0090.00917.61
8.4.80.0060.00417.69
8.4.70.0170.00317.89
8.4.60.0110.00819.64
8.4.50.0140.00617.66
8.4.40.0030.00717.61
8.4.30.0070.01418.50
8.4.20.0110.01120.63
8.4.10.0060.00319.56
8.3.250.0090.00918.88
8.3.240.0090.01116.74
8.3.230.0140.00516.70
8.3.220.0130.00617.24
8.3.210.0040.00316.65
8.3.200.0100.00816.57
8.3.190.0030.00418.73
8.3.180.0110.00616.59
8.3.170.0090.00916.64
8.3.160.0150.00317.33
8.3.150.0180.00018.99
8.3.140.0080.00019.07
8.3.130.0040.00418.50
8.3.120.0040.00420.96
8.3.110.0060.00916.84
8.3.100.0130.00316.56
8.3.90.0080.01226.77
8.3.80.0100.00018.55
8.3.70.0120.00916.63
8.3.60.0110.00418.43
8.3.50.0050.01017.51
8.3.40.0110.00418.90
8.3.30.0070.00718.59
8.3.20.0050.00321.90
8.3.10.0040.00421.89
8.3.00.0060.00323.48
8.2.290.0140.00520.46
8.2.280.0090.00920.40
8.2.270.0040.01516.85
8.2.260.0060.01218.34
8.2.250.0100.00316.99
8.2.240.0030.00616.96
8.2.230.0030.00620.94
8.2.220.0040.00424.06
8.2.210.0040.00426.77
8.2.200.0060.00318.16
8.2.190.0100.01316.58
8.2.180.0030.01925.92
8.2.170.0120.00622.96
8.2.160.0070.00720.39
8.2.150.0030.00624.18
8.2.140.0030.00624.66
8.2.130.0050.00226.16
8.2.120.0000.00726.16
8.2.110.0030.00620.75
8.2.100.0070.00417.66
8.2.90.0040.00417.91
8.2.80.0080.00017.97
8.2.70.0000.00817.91
8.2.60.0000.00818.09
8.2.50.0040.00418.10
8.2.40.0000.00819.23
8.2.30.0000.00819.20
8.2.20.0070.00017.94
8.2.10.0040.00418.82
8.2.00.0030.00519.07
8.1.330.0090.00916.80
8.1.320.0120.00716.08
8.1.310.0140.00318.59
8.1.300.0110.00318.44
8.1.290.0040.00730.84
8.1.280.0150.00625.92
8.1.270.0090.00022.46
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0060.00322.08
8.1.230.0040.00720.93
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0060.00317.22
8.1.190.0080.00016.88
8.1.180.0000.00818.10
8.1.170.0000.00818.47
8.1.160.0070.00018.86
8.1.150.0040.00418.84
8.1.140.0000.00818.78
8.1.130.0040.00419.23
8.1.120.0030.00717.32
8.1.110.0000.00717.32
8.1.100.0030.00617.44
8.1.90.0020.00517.39
8.1.80.0000.01017.43
8.1.70.0000.00717.31
8.1.60.0000.00817.43
8.1.50.0000.00817.36
8.1.40.0030.00517.39
8.1.30.0050.00217.58
8.1.20.0030.00617.52
8.1.10.0000.00917.37
8.1.00.0000.00817.23
8.0.300.0000.00819.66
8.0.290.0030.00616.75
8.0.280.0040.00418.43
8.0.270.0030.00517.21
8.0.260.0030.00316.75
8.0.250.0070.00016.91
8.0.240.0030.00316.86
8.0.230.0080.00016.88
8.0.220.0030.00316.92
8.0.210.0070.00016.95
8.0.200.0000.00716.99
8.0.190.0050.00216.96
8.0.180.0000.00716.81
8.0.170.0040.00416.94
8.0.160.0040.00416.92
8.0.150.0000.00716.73
8.0.140.0000.00716.91
8.0.130.0000.00613.36
8.0.120.0070.00016.75
8.0.110.0020.00516.79
8.0.100.0000.00716.88
8.0.90.0000.00716.85
8.0.80.0030.01216.93
8.0.70.0000.00716.87
8.0.60.0000.00816.77
8.0.50.0060.00316.77
8.0.30.0120.00716.98
8.0.20.0160.00816.89
8.0.10.0040.00417.03
8.0.00.0120.00516.64
7.4.330.0050.00015.55
7.4.320.0060.00016.42
7.4.300.0060.00016.44
7.4.290.0000.00716.55
7.4.280.0070.00016.56
7.4.270.0080.00016.47
7.4.260.0000.00716.42
7.4.250.0030.00316.44
7.4.240.0020.00516.41
7.4.230.0040.00416.34
7.4.220.0040.00416.63
7.4.210.0100.00716.54
7.4.200.0000.00716.59
7.4.160.0100.00816.46
7.4.130.0120.00616.50
7.4.120.0040.01116.73
7.4.110.0100.00616.53
7.4.100.0070.01416.16
7.4.90.0130.01016.52
7.4.80.0030.01319.39
7.4.70.0070.01016.47
7.4.60.0070.01016.36
7.4.50.0080.00816.10
7.4.40.0170.00016.49
7.4.00.0100.00714.73
7.3.330.0000.00513.12
7.3.320.0050.00013.26
7.3.310.0070.00016.36
7.3.300.0000.00716.14
7.3.290.0070.00016.30
7.3.280.0070.01216.22
7.3.260.0110.00716.33
7.3.240.0100.00816.30
7.3.230.0110.00616.41
7.3.210.0150.00416.25
7.3.200.0070.01116.47
7.3.190.0060.01016.38
7.3.180.0000.01616.48
7.3.170.0060.01016.23
7.3.160.0070.01416.45
7.3.60.0100.00714.80
7.3.50.0030.01314.78
7.3.40.0150.00614.58
7.3.30.0060.00914.72
7.3.20.0030.00816.64
7.3.10.0120.00116.56
7.3.00.0160.00516.44
7.2.330.0170.00316.29
7.2.320.0060.01316.34
7.2.310.0000.01616.49
7.2.300.0110.01116.68
7.2.290.0080.01116.50
7.2.190.0100.01014.66
7.2.180.0050.01014.66
7.2.170.0080.01514.74
7.2.160.0050.00714.67
7.2.150.0100.00416.71
7.2.140.0050.00816.76
7.2.130.0080.00916.80
7.2.120.0170.00016.67
7.2.110.0050.00816.76
7.2.100.0090.01116.64
7.2.90.0080.01116.87
7.2.80.0120.00516.78
7.2.70.0130.00616.83
7.2.60.0020.01116.64
7.2.50.0060.01116.75
7.2.40.0060.00916.70
7.2.30.0030.01516.90
7.2.20.0050.00816.75
7.2.10.0080.00516.72
7.2.00.0070.00916.75
7.1.300.0090.00915.44
7.1.290.0100.00715.68
7.1.280.0080.00615.65
7.1.270.0040.00715.59
7.1.260.0040.01115.49
7.1.250.0110.00515.47

preferences:
136.13 ms | 403 KiB | 5 Q