3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Shape { public int $numberOfSides; public string $name; public function setNumberOfSides(int $numberOfSides): void { $this->numberOfSides = $numberOfSides; } public function setName(string $name): void { $this->name = $name; } public function getNumberOfSides(): int { return $this->numberOfSides; } public function getName(): string { return $this->name; } } $triangle = new Shape(); $triangle ->setNumberofSides(4) ->setName("triangle"); var_dump($triangle);

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.70.0110.00416.74
8.3.60.0120.00416.75
8.3.50.0070.01018.14
8.3.40.0140.00719.21
8.3.30.0130.00318.70
8.3.20.0000.00824.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.190.0130.00318.41
8.2.180.0040.01125.92
8.2.170.0070.00722.96
8.2.160.0040.01122.96
8.2.150.0040.00425.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00026.35
8.2.110.0060.01021.11
8.2.100.0060.00717.78
8.2.90.0040.00717.63
8.2.80.0050.00318.71
8.2.70.0060.00317.50
8.2.60.0050.00217.91
8.2.50.0060.00318.07
8.2.40.0080.00019.82
8.2.30.0040.00417.99
8.2.20.0040.00417.98
8.2.10.0070.00020.97
8.2.00.0030.00519.11
8.1.280.0090.00625.92
8.1.270.0000.00823.99
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0060.00320.84
8.1.230.0110.00017.77
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0090.00017.23
8.1.190.0030.00517.11
8.1.180.0040.00422.12
8.1.170.0040.00420.23
8.1.160.0070.00018.73
8.1.150.0040.00418.77
8.1.140.0040.00418.73
8.1.130.0030.00320.07
8.1.120.0070.00017.41
8.1.110.0000.00817.28
8.1.100.0080.00017.44
8.1.90.0000.00717.26
8.1.80.0040.00417.43
8.1.70.0030.00317.46
8.1.60.0030.00517.46
8.1.50.0030.00517.43
8.1.40.0040.00417.52
8.1.30.0000.00817.66
8.1.20.0040.00417.53
8.1.10.0050.00217.55
8.1.00.0080.00017.48
8.0.300.0070.00018.77
8.0.290.0090.00016.75
8.0.280.0060.00318.29
8.0.270.0000.00718.00
8.0.260.0030.00520.18
8.0.250.0040.00416.85
8.0.240.0040.00416.83
8.0.230.0030.00316.86
8.0.220.0030.00316.77
8.0.210.0070.00016.82
8.0.200.0030.00316.97
8.0.190.0040.00416.84
8.0.180.0000.00816.82
8.0.170.0060.00616.86
8.0.160.0080.00016.93
8.0.150.0030.00516.70
8.0.140.0080.00016.89
8.0.130.0000.00513.27
8.0.120.0070.00016.82
8.0.110.0000.00716.92
8.0.100.0040.00416.73
8.0.90.0000.00916.78
8.0.80.0080.00816.88
8.0.70.0000.00716.74
8.0.60.0000.00716.92
8.0.50.0000.00716.84
8.0.30.0100.00717.27
8.0.20.0190.00417.30
8.0.10.0020.00517.04
8.0.00.0110.00716.70
7.4.330.0050.00015.55
7.4.320.0000.00616.45
7.4.300.0000.00616.58
7.4.290.0030.00316.42
7.4.280.0040.00416.50
7.4.270.0030.00316.64
7.4.260.0000.00713.27
7.4.250.0050.00216.48
7.4.240.0000.00716.63
7.4.230.0030.00316.25
7.4.220.0030.00416.50
7.4.210.0080.00816.55
7.4.200.0030.00316.53
7.4.130.0080.01116.53
7.4.120.0170.00016.46
7.4.110.0060.01116.52
7.4.100.0070.01016.54
7.4.90.0070.01016.47
7.4.80.0130.00719.39
7.4.70.0060.00916.27
7.4.60.0070.01316.52
7.4.50.0070.01316.20
7.4.40.0090.00616.33
7.4.30.0030.01216.43
7.4.20.0120.00316.27
7.4.10.0060.00916.32
7.4.00.0130.00316.39
7.3.330.0000.00716.25
7.3.320.0000.00513.22
7.3.310.0000.00716.24
7.3.300.0070.00016.19
7.3.290.0060.00816.27
7.3.280.0090.00616.10
7.3.260.0100.01016.45
7.3.240.0140.00616.27
7.3.230.0070.01116.40
7.3.210.0100.01316.14
7.3.200.0120.00316.26
7.3.190.0080.00816.11
7.3.180.0080.01116.36
7.3.170.0070.01016.22
7.3.160.0070.00716.23
7.3.150.0090.00616.28
7.3.140.0030.01216.18
7.3.130.0030.01216.39
7.3.120.0090.00616.09
7.3.110.0150.00016.25
7.3.100.0070.00916.03
7.3.90.0090.00616.18
7.3.80.0000.01516.25
7.3.70.0120.00316.26
7.3.60.0040.01115.97
7.3.50.0060.00916.16
7.3.40.0040.01216.27
7.3.30.0110.00616.03
7.3.20.0130.00616.04
7.3.10.0140.00316.21
7.3.00.0080.00816.14
7.2.330.0060.01216.39
7.2.320.0090.01216.27
7.2.310.0080.00816.26
7.2.300.0070.00716.12
7.2.290.0060.00916.10
7.2.280.0090.00616.37
7.2.270.0090.00616.51
7.2.260.0080.00816.19
7.2.250.0060.01116.45
7.2.240.0060.01016.04
7.2.230.0030.01216.24
7.2.220.0060.00916.20
7.2.210.0060.01016.49
7.2.200.0130.00316.31
7.2.190.0090.00616.14
7.2.180.0060.00916.29
7.2.170.0090.00616.44
7.2.160.0060.00916.30
7.2.150.0090.00916.48
7.2.140.0110.00616.19
7.2.130.0060.00916.41
7.2.120.0120.00416.42
7.2.110.0090.00616.34
7.2.100.0090.00616.31
7.2.90.0060.01016.36
7.2.80.0040.01116.15
7.2.70.0120.00316.16
7.2.60.0030.01216.29
7.2.50.0140.01116.33
7.2.40.0040.01216.43
7.2.30.0070.01016.45
7.2.20.0070.01116.23
7.2.10.0080.01216.16
7.2.00.0070.01316.40

preferences:
18.03 ms | 401 KiB | 5 Q