3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { /** * @var int */ private $bar; public function __construct(int $bar) { $this->bar = $bar; } public function getBar() { return $this->bar; } public function baz(int $boz) { return $boz . ':' . $this->getBar(); } public function __invoke(int $boz) { echo $this->baz($boz); echo "fooobar"; } } $foo2 = new Foo(1); $foo2(2);

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.0140.00716.49
8.3.50.0100.00318.04
8.3.40.0120.00318.74
8.3.30.0110.00418.90
8.3.20.0000.00721.96
8.3.10.0040.00421.90
8.3.00.0050.00319.18
8.2.180.0160.00625.92
8.2.170.0110.00722.96
8.2.160.0080.00619.16
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0050.00319.85
8.2.120.0040.00426.35
8.2.110.0060.00320.88
8.2.100.0080.00417.78
8.2.90.0040.00420.42
8.2.80.0000.00820.55
8.2.70.0000.00917.63
8.2.60.0040.00417.63
8.2.50.0030.00618.10
8.2.40.0090.00020.55
8.2.30.0050.00219.44
8.2.20.0000.00718.18
8.2.10.0040.00418.13
8.2.00.0040.00418.05
8.1.280.0040.01125.92
8.1.270.0050.00222.10
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.13
8.1.230.0080.00420.90
8.1.220.0080.00017.74
8.1.210.0040.00418.97
8.1.200.0030.00617.48
8.1.190.0000.00817.13
8.1.180.0000.00818.10
8.1.170.0000.00718.88
8.1.160.0000.00818.97
8.1.150.0040.00419.02
8.1.140.0000.00717.71
8.1.130.0030.00320.18
8.1.120.0070.00017.50
8.1.110.0000.00817.46
8.1.100.0100.00017.36
8.1.90.0020.00517.47
8.1.80.0040.00417.37
8.1.70.0000.00717.48
8.1.60.0040.00417.61
8.1.50.0040.00417.53
8.1.40.0050.00317.42
8.1.30.0040.00417.71
8.1.20.0070.00017.46
8.1.10.0030.00617.59
8.1.00.0040.00417.56
8.0.300.0040.00420.09
8.0.290.0040.00416.75
8.0.280.0020.00518.50
8.0.270.0030.00317.30
8.0.260.0030.00616.70
8.0.250.0000.00716.97
8.0.240.0040.00416.94
8.0.230.0000.00717.00
8.0.220.0000.00716.93
8.0.210.0040.00416.84
8.0.200.0060.00316.89
8.0.190.0040.00416.84
8.0.180.0000.00816.82
8.0.170.0040.00416.93
8.0.160.0040.00416.79
8.0.150.0080.00016.83
8.0.140.0000.00816.82
8.0.130.0060.00313.29
8.0.120.0000.00716.81
8.0.110.0070.00016.95
8.0.100.0040.00416.80
8.0.90.0040.00417.01
8.0.80.0040.01216.86
8.0.70.0080.00016.79
8.0.60.0000.00716.89
8.0.50.0050.00217.00
8.0.30.0100.00917.10
8.0.20.0050.01517.40
8.0.10.0040.00416.90
8.0.00.0120.00616.72
7.4.330.0020.00215.55
7.4.320.0000.00616.43
7.4.300.0000.00616.60
7.4.290.0000.00716.65
7.4.280.0080.00016.55
7.4.270.0070.00016.56
7.4.260.0070.00016.59
7.4.250.0050.00316.45
7.4.240.0070.00016.48
7.4.230.0030.00516.60
7.4.220.0080.00016.44
7.4.210.0070.01116.53
7.4.200.0030.00316.55
7.4.160.0140.00516.50
7.4.140.0120.00617.86
7.4.130.0120.01216.56
7.4.120.0120.00816.48
7.4.110.0070.01416.46
7.4.100.0110.00716.58
7.4.90.0090.01316.44
7.4.80.0220.00319.39
7.4.70.0110.00616.45
7.4.60.0090.00916.68
7.4.50.0070.00716.61
7.4.40.0140.00316.50
7.4.00.0040.00814.72
7.3.330.0020.00213.26
7.3.320.0050.00013.33
7.3.310.0030.00616.16
7.3.300.0000.00716.26
7.3.290.0030.00316.27
7.3.280.0130.00416.28
7.3.260.0060.01116.47
7.3.240.0070.00916.39
7.3.230.0100.00616.32
7.3.210.0060.01616.69
7.3.200.0130.00316.48
7.3.190.0110.00716.39
7.3.180.0090.00616.53
7.3.170.0070.01016.49
7.3.160.0100.00716.62
7.3.120.0030.01015.05
7.3.110.0110.00714.47
7.3.100.0110.00414.71
7.3.90.0030.01014.53
7.3.80.0040.00814.87
7.3.70.0100.00314.64
7.3.60.0040.01414.84
7.3.50.0030.00914.90
7.3.40.0070.00714.72
7.3.30.0040.00714.76
7.3.20.0050.00516.83
7.3.10.0080.00416.82
7.3.00.0070.01016.44
7.2.330.0060.01616.77
7.2.320.0150.00316.70
7.2.310.0130.00316.68
7.2.300.0130.01016.48
7.2.290.0130.01016.48
7.2.240.0110.00315.11
7.2.230.0060.00615.24
7.2.220.0030.01015.09
7.2.210.0070.00314.85
7.2.200.0040.01114.89
7.2.190.0100.00715.18
7.2.180.0000.01815.22
7.2.170.0100.00014.73
7.2.160.0070.00415.18
7.2.150.0080.00416.88
7.2.140.0100.00317.00
7.2.130.0030.01016.92
7.2.120.0090.00016.59
7.2.110.0080.00416.80
7.2.100.0080.00416.99
7.2.90.0000.01317.03
7.2.80.0060.00617.21
7.2.70.0060.01016.90
7.2.60.0050.00516.90
7.2.50.0040.00616.75
7.2.40.0560.00517.21
7.2.30.0520.00917.62
7.2.20.0440.00817.48
7.2.10.0370.01317.50
7.2.00.0410.00817.26
7.1.330.0030.01015.83
7.1.320.0040.00415.79
7.1.310.0030.00615.78
7.1.300.0140.00315.52
7.1.290.0040.01115.80
7.1.280.0000.01215.54
7.1.270.0000.01615.78
7.1.260.0000.00915.46
7.1.250.0040.00415.98
7.1.200.0040.00715.66
7.1.160.0890.01116.54
7.1.150.0960.01016.73
7.1.140.0790.00717.02
7.1.130.1020.00916.68
7.1.120.0750.01216.76
7.1.110.0940.00716.17
7.1.100.0740.01116.13
7.1.90.1260.01016.09
7.1.80.1030.01015.76
7.1.70.1060.01315.23
7.1.60.1080.01333.27
7.1.50.1860.01232.84
7.1.40.1810.01332.71
7.1.30.1770.01532.66
7.1.20.2220.01932.64
7.1.10.1580.01014.65
7.1.00.1010.00514.77

preferences:
63.87 ms | 400 KiB | 5 Q