3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Item { // more code public function getPrice() { return $this->price; } public function setPrice(float $price) { $this->price = $price; } public function setTitle(string $title) { $this->title = $title; } public function setPublished(bool $published) { $this->published = $published; } public function setId(int $id) { $this->id = $id; } } $item = new Item(); $item->setPrice('string'); var_dump($item->getPrice()); ?>

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.40.0070.01018.88
8.3.30.0100.00718.66
8.3.20.0090.00620.20
8.3.10.0000.00721.90
8.3.00.0050.00319.92
8.2.170.0180.00622.96
8.2.160.0030.01020.32
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00417.63
8.2.110.0080.00020.22
8.2.100.0090.00317.50
8.2.90.0050.00219.12
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0000.00817.68
8.2.50.0000.00818.07
8.2.40.0050.00321.18
8.2.30.0030.00619.70
8.2.20.0000.00817.62
8.2.10.0060.00317.90
8.2.00.0050.00317.92
8.1.270.0090.00920.38
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00023.84
8.1.230.0060.00617.42
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0000.00917.48
8.1.190.0050.00317.23
8.1.180.0000.00818.10
8.1.170.0000.00918.71
8.1.160.0020.00521.92
8.1.150.0000.00718.70
8.1.140.0000.00817.38
8.1.130.0000.00717.67
8.1.120.0000.00717.38
8.1.110.0000.00717.27
8.1.100.0030.00517.24
8.1.90.0050.00317.46
8.1.80.0040.00417.36
8.1.70.0000.00717.29
8.1.60.0000.00817.57
8.1.50.0000.00717.48
8.1.40.0040.00417.49
8.1.30.0030.00617.72
8.1.20.0040.00417.47
8.1.10.0000.00717.55
8.1.00.0030.00617.53
8.0.300.0000.00718.77
8.0.290.0070.00016.63
8.0.280.0030.00318.37
8.0.270.0040.00417.08
8.0.260.0000.00717.13
8.0.250.0040.00416.86
8.0.240.0040.00416.82
8.0.230.0070.00016.85
8.0.220.0040.00416.82
8.0.210.0070.00016.89
8.0.200.0040.00416.96
8.0.190.0000.00816.97
8.0.180.0000.00716.98
8.0.170.0040.00416.87
8.0.160.0030.00516.88
8.0.150.0030.00516.90
8.0.140.0070.00016.90
8.0.130.0030.00313.36
8.0.120.0040.00416.82
8.0.110.0040.00416.82
8.0.100.0050.00316.88
8.0.90.0070.00016.83
8.0.80.0140.03516.88
8.0.70.0050.00316.86
8.0.60.0040.00416.76
8.0.50.0040.00416.88
8.0.30.0140.00616.96
8.0.20.0140.00917.42
8.0.10.0000.00716.88
8.0.00.0080.00916.81
7.4.330.0020.00215.08
7.4.320.0040.00416.49
7.4.300.0020.00516.51
7.4.290.0040.00416.58
7.4.280.0040.00416.59
7.4.270.0030.00316.61
7.4.260.0070.00016.57
7.4.250.0040.00416.57
7.4.240.0050.00216.56
7.4.230.0000.00716.48
7.4.220.0140.01116.71
7.4.210.0110.00316.54
7.4.200.0070.00016.57
7.4.160.0050.01116.50
7.4.150.0090.00917.40
7.4.140.0120.00917.86
7.4.130.0060.01216.47
7.4.120.0100.00716.47
7.4.110.0030.01416.42
7.4.100.0030.01716.34
7.4.90.0070.01016.45
7.4.80.0030.01319.39
7.4.70.0030.01616.44
7.4.60.0060.00916.57
7.4.50.0000.00816.48
7.4.40.0100.00716.25
7.4.30.0030.01316.22
7.4.00.0070.00714.98
7.3.330.0060.00013.32
7.3.320.0050.00013.30
7.3.310.0030.00316.17
7.3.300.0030.00316.40
7.3.290.0100.00716.34
7.3.280.0090.01016.33
7.3.270.0140.00317.40
7.3.260.0120.00416.29
7.3.250.0130.00616.43
7.3.240.0100.01016.58
7.3.230.0070.01416.39
7.3.210.0190.00016.45
7.3.200.0060.01316.48
7.3.190.0100.00716.31
7.3.180.0100.00616.22
7.3.170.0170.00016.39
7.3.160.0140.00316.23
7.2.330.0120.00616.39
7.2.320.0090.00916.75
7.2.310.0100.00616.67
7.2.300.0140.00516.64
7.2.290.0060.01616.40
7.2.80.0070.00316.67
7.2.60.0080.00616.68
7.2.00.0070.00719.37
7.1.200.0090.00315.76
7.1.100.0060.00617.98
7.1.70.0000.00817.15
7.1.60.0040.01820.03
7.1.50.0140.00716.92
7.1.00.0030.07722.28
7.0.200.0450.00314.52
7.0.60.0170.07019.90
7.0.50.0100.07717.78
7.0.40.0000.04720.22
7.0.30.0230.07320.21
7.0.20.0200.05720.26
7.0.10.0230.04720.19
7.0.00.0200.03320.07
5.6.280.0000.03321.10
5.6.210.0100.04020.73
5.6.200.0070.04018.16
5.6.190.0070.09020.61
5.6.180.0030.06020.57
5.6.170.0270.04720.71
5.6.160.0070.04320.56
5.6.150.0070.06018.22
5.6.140.0000.04718.25
5.6.130.0070.08018.17
5.6.120.0030.05721.04
5.6.110.0070.08021.12
5.6.100.0070.06321.01
5.6.90.0130.05320.98
5.6.80.0100.07720.43
5.6.70.4230.04320.50
5.5.350.0030.05720.31
5.5.340.0070.08017.99
5.5.330.0100.05320.57
5.5.320.0270.03720.24
5.5.310.0270.07720.35
5.5.300.0000.05317.92
5.5.290.0030.07318.07
5.5.280.0070.08320.89
5.5.270.0100.03720.85
5.5.260.0070.08320.96
5.5.250.0100.07320.55
5.5.240.0070.06320.27
5.4.450.0130.06719.34
5.4.440.0130.06019.30
5.4.430.0270.05019.61
5.4.420.0200.04719.57
5.4.410.0070.06019.50
5.4.400.0200.05018.98
5.4.390.0270.04719.25
5.4.380.0200.05019.28
5.4.370.0200.05019.28
5.4.360.0300.04719.23
5.4.350.0200.05019.25
5.4.340.0170.05719.12
5.4.320.0300.04718.83
5.4.310.0170.05719.21
5.4.300.0200.05019.11
5.4.290.0170.05718.98
5.4.280.0130.05319.14
5.4.270.0070.06318.97
5.4.260.0130.05019.13
5.4.250.0200.05019.30
5.4.240.0230.04719.27
5.4.230.0200.05319.27
5.4.220.0230.05019.01
5.4.210.0200.05719.10
5.4.200.0170.05319.22
5.4.190.0170.05318.96
5.4.180.0100.06019.12
5.4.170.0130.06319.35
5.4.160.0100.06019.18
5.4.150.0100.05718.99
5.4.140.0070.05716.69
5.4.130.0170.04016.45
5.4.120.0200.04316.43
5.4.110.0200.04716.60
5.4.100.0230.04016.20
5.4.90.0170.05016.43
5.4.80.0170.04716.63
5.4.70.0070.06316.57
5.4.60.0130.06316.49
5.4.50.0030.04716.42
5.4.40.0030.04716.53
5.4.30.0270.04016.50
5.4.20.0270.05716.48
5.4.10.0030.06716.48

preferences:
57.99 ms | 400 KiB | 5 Q