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) { if (class_exists($class)) { return new $class(); } return null; } $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.0140.00716.63
8.3.50.0110.00718.02
8.3.40.0070.00718.61
8.3.30.0070.00718.76
8.3.20.0040.00420.29
8.3.10.0040.00423.52
8.3.00.0070.00019.79
8.2.180.0060.00916.38
8.2.170.0130.00322.96
8.2.160.0100.00320.57
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.00321.10
8.2.120.0060.00326.35
8.2.110.0070.00322.11
8.2.100.0060.00617.91
8.2.90.0040.00419.23
8.2.80.0080.00017.97
8.2.70.0080.00017.50
8.2.60.0040.00417.92
8.2.50.0040.00418.07
8.2.40.0000.00821.07
8.2.30.0040.00420.62
8.2.20.0040.00417.49
8.2.10.0000.00717.92
8.2.00.0000.00817.89
8.1.280.0100.01025.92
8.1.270.0080.00019.95
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0090.00023.61
8.1.230.0060.00617.52
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0040.00417.10
8.1.180.0000.00818.10
8.1.170.0000.00818.67
8.1.160.0070.00020.68
8.1.150.0000.00718.93
8.1.140.0040.00419.51
8.1.130.0000.00717.51
8.1.120.0000.00717.42
8.1.110.0040.00417.30
8.1.100.0000.00817.45
8.1.90.0030.00417.31
8.1.80.0000.00717.36
8.1.70.0040.00417.39
8.1.60.0040.00417.60
8.1.50.0000.00817.55
8.1.40.0040.00417.46
8.1.30.0060.00317.69
8.1.20.0070.00017.61
8.1.10.0040.00417.61
8.1.00.0040.00417.45
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0030.00318.44
8.0.270.0070.00017.19
8.0.260.0030.00317.20
8.0.250.0000.00716.77
8.0.240.0070.00016.88
8.0.230.0040.00416.81
8.0.220.0000.00816.80
8.0.210.0030.00516.70
8.0.200.0030.00316.75
8.0.190.0000.00716.93
8.0.180.0000.00816.74
8.0.170.0040.00416.86
8.0.160.0030.00516.95
8.0.150.0000.00716.83
8.0.140.0000.00816.71
8.0.130.0030.00513.23
8.0.120.0030.00616.78
8.0.110.0030.00616.76
8.0.100.0040.00416.82
8.0.90.0030.00316.70
8.0.80.0030.01316.84
8.0.70.0000.00716.72
8.0.60.0000.00716.89
8.0.50.0000.00816.64
8.0.30.0090.00917.11
8.0.20.0080.01217.40
8.0.10.0040.00416.82
8.0.00.0090.00716.77
7.4.330.0060.00016.73
7.4.320.0070.00016.58
7.4.300.0030.00316.50
7.4.290.0030.00616.41
7.4.280.0000.00816.39
7.4.270.0060.00016.50
7.4.260.0030.00316.48
7.4.250.0000.00816.55
7.4.240.0060.00116.47
7.4.230.0000.00816.39
7.4.220.0060.01216.60
7.4.210.0120.00316.68
7.4.200.0000.00816.60
7.4.160.0060.00916.56
7.4.150.0150.00917.40
7.4.140.0100.00917.86
7.4.130.0100.00816.60
7.4.120.0130.00616.44
7.4.110.0060.01216.40
7.4.100.0080.00816.54
7.4.90.0030.01616.48
7.4.80.0080.00819.39
7.4.70.0030.01716.51
7.4.60.0100.00716.39
7.4.50.0060.01016.15
7.4.40.0040.01216.50
7.4.30.0130.00716.61
7.4.00.0090.00615.14
7.3.330.0040.00413.38
7.3.320.0050.00013.29
7.3.310.0040.00416.33
7.3.300.0050.00216.41
7.3.290.0080.01016.37
7.3.280.0080.00716.36
7.3.270.0110.00717.40
7.3.260.0080.01616.63
7.3.250.0100.01516.43
7.3.240.0090.00916.34
7.3.230.0100.01016.49
7.3.210.0090.00916.50
7.3.200.0110.00416.64
7.3.190.0070.01416.48
7.3.180.0070.01316.30
7.3.170.0100.01016.27
7.3.160.0090.01216.36
7.3.120.0100.00715.08
7.3.110.0100.00714.80
7.3.100.0070.00714.66
7.3.90.0100.00014.61
7.3.80.0030.00914.93
7.3.70.0060.00614.78
7.3.60.0030.01014.77
7.3.50.0000.01214.93
7.3.40.0110.00314.59
7.3.30.0060.00314.78
7.3.20.0030.01416.72
7.3.10.0100.00316.72
7.3.00.0060.00616.74
7.2.330.0060.00916.42
7.2.320.0140.00316.72
7.2.310.0080.00816.75
7.2.300.0090.00916.64
7.2.290.0070.01016.68
7.2.250.0090.00914.89
7.2.240.0060.01215.19
7.2.230.0070.01115.02
7.2.220.0090.00315.07
7.2.210.0000.01015.12
7.2.200.0000.00915.20
7.2.190.0020.01014.70
7.2.180.0060.00615.11
7.2.170.0030.00915.02
7.2.60.0130.00316.65
7.2.00.0000.01219.48
7.1.330.0080.00815.50
7.1.320.0060.00615.78
7.1.310.0060.00315.97
7.1.300.0040.01115.68
7.1.290.0000.01415.74
7.1.280.0070.00715.66
7.1.270.0030.00715.76
7.1.260.0030.00615.74
7.1.200.0030.01015.86
7.1.100.0030.00517.95
7.1.70.0060.00317.19
7.1.60.0110.01119.13
7.1.50.0030.00916.78
7.1.00.0030.07722.51
7.0.200.0730.00714.75
7.0.60.0130.07320.10
7.0.50.0130.07717.85
7.0.40.0170.07320.20
7.0.30.0230.07320.13
7.0.20.0370.07320.19
7.0.10.0000.05320.30
7.0.00.0030.06320.22
5.6.280.0000.07321.16
5.6.210.0070.03720.57
5.6.200.0070.05718.26
5.6.190.0130.08020.50
5.6.180.0230.05320.61
5.6.170.0170.04720.47
5.6.160.0030.04720.55
5.6.150.0030.07318.14
5.6.140.0100.04718.17
5.6.130.0030.04018.14
5.6.120.0030.04021.14
5.6.110.0100.06720.98
5.6.100.0130.07021.04
5.6.90.0030.04321.06
5.6.80.0170.06320.53
5.5.350.0230.07020.36
5.5.340.0100.07318.04
5.5.330.0070.05020.42
5.5.320.0630.06320.34
5.5.310.0170.07320.34
5.5.300.0030.05718.07
5.5.290.0070.08018.08
5.5.280.0030.08720.88
5.5.270.0130.07720.87
5.5.260.0030.08720.84
5.5.250.0070.04020.50
5.5.240.0170.08020.15

preferences:
59.06 ms | 400 KiB | 5 Q