3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo { private $x; public function setX($x) : Foo { $this->x = $x; return $this; } public function getX() { return $this->x; } } function test($class) { return new $class(); } $x = test('Foo')->setX('test'); var_dump($x->getX());

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.0070.01116.75
8.3.50.0160.00722.05
8.3.40.0150.00318.56
8.3.30.0110.00418.79
8.3.20.0050.00320.04
8.3.10.0040.00423.69
8.3.00.0000.00919.97
8.2.180.0110.01125.92
8.2.170.0080.00622.96
8.2.160.0030.01020.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.00319.08
8.2.120.0060.00326.35
8.2.110.0110.00021.00
8.2.100.0090.00317.78
8.2.90.0080.00017.90
8.2.80.0040.00417.97
8.2.70.0090.00017.63
8.2.60.0050.00317.91
8.2.50.0030.00518.07
8.2.40.0060.00322.12
8.2.30.0070.00020.55
8.2.20.0000.00817.54
8.2.10.0040.00417.98
8.2.00.0040.00418.00
8.1.280.0120.00425.92
8.1.270.0080.00820.38
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0060.00322.53
8.1.230.0060.00620.85
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0090.00017.23
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0080.00018.51
8.1.160.0030.00520.71
8.1.150.0030.00318.81
8.1.140.0000.00819.52
8.1.130.0000.00817.59
8.1.120.0070.00017.39
8.1.110.0000.00717.41
8.1.100.0000.00817.37
8.1.90.0030.00317.41
8.1.80.0070.00017.30
8.1.70.0000.00817.25
8.1.60.0040.00417.60
8.1.50.0000.00817.43
8.1.40.0090.00017.42
8.1.30.0030.00517.60
8.1.20.0080.00017.52
8.1.10.0000.00817.58
8.1.00.0040.00417.40
8.0.300.0040.00419.90
8.0.290.0000.00716.63
8.0.280.0000.00718.38
8.0.270.0030.00317.21
8.0.260.0030.00317.20
8.0.250.0060.00016.79
8.0.240.0000.00616.85
8.0.230.0030.00616.86
8.0.220.0000.00816.74
8.0.210.0030.00316.84
8.0.200.0000.00616.86
8.0.190.0040.00716.91
8.0.180.0050.00316.78
8.0.170.0080.00016.77
8.0.160.0030.00316.79
8.0.150.0030.00316.78
8.0.140.0040.00416.69
8.0.130.0030.00313.21
8.0.120.0000.00816.78
8.0.110.0000.00716.75
8.0.100.0000.00816.73
8.0.90.0000.00716.77
8.0.80.0030.01216.82
8.0.70.0020.00516.90
8.0.60.0030.00516.86
8.0.50.0040.00416.81
8.0.30.0070.01417.09
8.0.20.0110.01017.40
8.0.10.0030.00516.83
8.0.00.0130.00516.61
7.4.330.0020.00216.81
7.4.320.0030.00316.54
7.4.300.0070.00016.52
7.4.290.0040.00416.43
7.4.280.0050.00316.49
7.4.270.0030.00316.40
7.4.260.0070.00016.57
7.4.250.0000.00716.49
7.4.240.0050.00216.45
7.4.230.0000.00716.71
7.4.220.0000.01716.63
7.4.210.0110.00316.45
7.4.200.0070.00016.48
7.4.160.0110.00516.43
7.4.150.0130.00617.40
7.4.140.0150.00617.86
7.4.130.0050.01416.52
7.4.120.0120.00716.54
7.4.110.0070.01016.64
7.4.100.0080.00816.28
7.4.90.0080.00816.41
7.4.80.0140.00419.39
7.4.70.0120.00816.62
7.4.60.0130.00716.48
7.4.50.0000.01516.50
7.4.40.0060.01216.61
7.4.30.0110.00716.71
7.4.00.0060.00814.95
7.3.330.0000.00713.38
7.3.320.0000.00513.30
7.3.310.0000.00716.39
7.3.300.0080.00016.23
7.3.290.0120.00416.36
7.3.280.0120.00516.32
7.3.270.0070.01517.40
7.3.260.0060.01216.36
7.3.250.0110.00716.43
7.3.240.0080.01016.30
7.3.230.0070.01016.45
7.3.210.0040.01216.68
7.3.200.0140.00316.26
7.3.190.0080.00816.38
7.3.180.0060.01616.39
7.3.170.0070.01116.70
7.3.160.0190.00316.35
7.3.120.0070.00714.73
7.3.110.0040.01214.86
7.3.100.0120.00314.85
7.3.90.0030.00515.01
7.3.80.0000.01414.61
7.3.70.0060.01214.91
7.3.60.0030.00614.76
7.3.50.0040.00814.71
7.3.40.0120.00314.77
7.3.30.0070.00714.79
7.3.20.0040.01216.92
7.3.10.0050.00516.36
7.3.00.0070.00716.59
7.2.330.0030.01516.39
7.2.320.0050.01116.73
7.2.310.0080.00816.75
7.2.300.0140.00316.57
7.2.290.0060.01516.60
7.2.250.0000.01915.22
7.2.240.0030.01314.87
7.2.230.0120.00615.00
7.2.220.0060.00814.77
7.2.210.0000.00914.96
7.2.200.0070.00714.63
7.2.190.0050.00514.81
7.2.180.0110.00314.79
7.2.170.0080.00414.82
7.2.60.0040.01116.78
7.2.00.0000.01619.38
7.1.330.0070.00715.49
7.1.320.0030.01215.95
7.1.310.0060.00615.84
7.1.300.0040.00415.77
7.1.290.0100.00315.71
7.1.280.0070.00715.51
7.1.270.0070.00715.75
7.1.260.0030.00615.77
7.1.200.0000.00915.82
7.1.100.0000.01218.17
7.1.70.0000.00917.38
7.1.60.0070.01419.13
7.1.50.0090.01317.06
7.1.00.0070.07722.43
7.0.200.0650.00714.84
7.0.60.0100.08319.92
7.0.50.0030.05017.84
7.0.40.0200.07320.11
7.0.30.0370.04320.08
7.0.20.0370.07320.06
7.0.10.0130.08020.20
7.0.00.0030.06320.20
5.6.280.0100.08021.16
5.6.210.0070.08320.48
5.6.200.0070.08018.16
5.6.190.0030.05020.61
5.6.180.0270.08320.66
5.6.170.0370.07320.44
5.6.160.0030.04320.48
5.6.150.0130.07318.25
5.6.140.0070.08318.15
5.6.130.0070.08318.19
5.6.120.0070.04320.90
5.6.110.0200.07721.02
5.6.100.0070.07721.14
5.6.90.0070.04021.02
5.6.80.0130.08020.38
5.5.350.0130.07020.44
5.5.340.0170.05317.96
5.5.330.0130.07720.33
5.5.320.0600.07020.36
5.5.310.0230.03320.31
5.5.300.0070.04317.92
5.5.290.0130.03018.07
5.5.280.0030.04320.77
5.5.270.0130.04720.87
5.5.260.0100.08020.79
5.5.250.0030.08320.50
5.5.240.0230.07020.14

preferences:
44.54 ms | 401 KiB | 5 Q