3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Products{ protected $_title; protected $_category; protected $_price; public function __construct($title, $category, $price){ $this->_title = $title; $this->_category = $category; $this->_price = $price; } public function getTitle(){ return $this->_title; } public function getCategory(){ return $this->_category; } public function getPrice(){ return $this->_price; } } $product = new Products('Title', 'Category', 45); $product->getPrice(); // 45

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.00718.55
8.3.50.0050.01822.18
8.3.40.0080.00818.76
8.3.30.0110.00318.92
8.3.20.0050.00220.21
8.3.10.0050.00322.09
8.3.00.0040.00422.40
8.2.180.0150.00016.34
8.2.170.0100.01022.96
8.2.160.0090.00619.08
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00617.50
8.2.110.0100.00020.99
8.2.100.0040.00817.78
8.2.90.0030.00619.23
8.2.80.0030.00717.97
8.2.70.0050.00317.25
8.2.60.0030.00617.90
8.2.50.0080.00018.07
8.2.40.0050.00318.03
8.2.30.0000.00818.07
8.2.20.0050.00217.59
8.2.10.0050.00319.32
8.2.00.0040.00417.64
8.1.280.0140.00025.92
8.1.270.0070.00022.01
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00821.28
8.1.230.0070.00717.45
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0090.00017.38
8.1.190.0080.00017.23
8.1.180.0000.00818.10
8.1.170.0040.00418.52
8.1.160.0000.00821.88
8.1.150.0040.00418.54
8.1.140.0040.00417.31
8.1.130.0000.00717.83
8.1.120.0040.00417.31
8.1.110.0050.00217.30
8.1.100.0080.00017.45
8.1.90.0040.00417.33
8.1.80.0050.00317.30
8.1.70.0000.00717.27
8.1.60.0070.00417.48
8.1.50.0040.00417.50
8.1.40.0000.00817.54
8.1.30.0050.00317.62
8.1.20.0030.00617.59
8.1.10.0040.00417.54
8.1.00.0000.00817.34
8.0.300.0000.00818.77
8.0.290.0050.00316.63
8.0.280.0070.00018.40
8.0.270.0000.00717.20
8.0.260.0000.00716.70
8.0.250.0000.01016.87
8.0.240.0040.00316.84
8.0.230.0070.00016.88
8.0.220.0070.00016.88
8.0.210.0030.00316.84
8.0.200.0000.00716.83
8.0.190.0080.00016.86
8.0.180.0070.00016.85
8.0.170.0030.00616.88
8.0.160.0030.00616.87
8.0.150.0000.00716.85
8.0.140.0000.00716.85
8.0.130.0050.00013.30
8.0.120.0040.00416.76
8.0.110.0000.00816.77
8.0.100.0020.00516.79
8.0.90.0000.00716.87
8.0.80.0060.00916.88
8.0.70.0000.00816.88
8.0.60.0000.00716.88
8.0.50.0040.00416.88
8.0.30.0130.00516.99
8.0.20.0140.00517.40
8.0.10.0040.00416.93
8.0.00.0120.00516.70
7.4.330.0040.00015.00
7.4.320.0040.00416.34
7.4.300.0070.00016.61
7.4.290.0000.00716.47
7.4.280.0060.00316.54
7.4.270.0070.00016.62
7.4.260.0030.00316.64
7.4.250.0050.00316.40
7.4.240.0000.00716.52
7.4.230.0000.00716.70
7.4.220.0100.00716.46
7.4.210.0060.01016.58
7.4.200.0030.00316.43
7.4.190.0070.00016.70
7.4.160.0000.01516.46
7.4.150.0090.00617.40
7.4.140.0090.01117.86
7.4.130.0100.01016.41
7.4.120.0100.00716.43
7.4.110.0060.00916.29
7.4.100.0120.00616.38
7.4.90.0190.00616.67
7.4.80.0070.01019.39
7.4.70.0100.01316.27
7.4.60.0030.01316.43
7.4.50.0040.00416.58
7.4.40.0070.01022.77
7.4.30.0100.00616.40
7.4.00.0000.01614.79
7.3.330.0020.00313.04
7.3.320.0050.00013.25
7.3.310.0020.00516.26
7.3.300.0030.00316.12
7.3.290.0110.00416.32
7.3.280.0070.00716.23
7.3.270.0100.00717.40
7.3.260.0090.00916.25
7.3.250.0070.01016.39
7.3.240.0100.00716.45
7.3.230.0150.00616.39
7.3.210.0090.00616.31
7.3.200.0120.00619.39
7.3.190.0150.00616.36
7.3.180.0030.01316.19
7.3.170.0110.01116.31
7.3.160.0030.00316.19
7.3.120.0070.00714.85
7.3.10.0000.01316.50
7.3.00.0030.01216.53
7.2.330.0060.01116.44
7.2.320.0100.01016.55
7.2.310.0030.01716.41
7.2.300.0110.00716.47
7.2.290.0140.00316.59
7.2.130.0000.01516.76
7.2.120.0090.00616.77
7.2.110.0000.01416.71
7.2.100.0030.01017.04
7.2.90.0040.01116.73
7.2.80.0100.00316.53
7.2.70.0090.00616.61
7.2.60.0060.00916.58
7.2.50.0070.01016.83
7.2.40.0110.00416.88
7.2.30.0100.00616.85
7.2.20.0040.01116.57
7.2.10.0100.01016.38
7.2.00.0020.01417.91
7.1.250.0090.00615.63
7.1.100.0040.00717.75
7.1.70.0000.00816.90
7.1.60.0000.02419.82
7.1.50.0070.01516.81
7.1.00.0070.07322.54
7.0.200.0030.00916.55
7.0.140.0070.07021.97
7.0.60.0100.08319.85
7.0.50.0100.06317.84
7.0.40.0100.08020.18
7.0.30.0400.04020.24
7.0.20.0300.07720.06
7.0.10.0100.04320.45
7.0.00.0000.05020.09
5.6.280.0000.07720.87
5.6.210.0070.08320.57
5.6.200.0070.08018.18
5.6.190.0100.08020.63
5.6.180.0330.07720.33
5.6.170.0270.05720.56
5.6.160.0100.09020.52
5.6.150.0070.08018.27
5.6.140.0030.08718.11
5.6.130.0130.03018.26
5.6.120.0100.05021.00
5.6.110.0100.04721.14
5.6.100.0070.08021.13
5.6.90.0070.08320.96
5.6.80.0100.08020.36
5.5.350.0200.04720.41
5.5.340.0030.03718.08
5.5.330.0100.06720.23
5.5.320.0030.04020.37
5.5.310.0270.03720.27
5.5.300.0070.07018.02
5.5.290.0100.07717.95
5.5.280.0000.04320.79
5.5.270.0000.04320.77
5.5.260.0070.05020.77
5.5.250.0100.08320.70
5.5.240.3170.02720.19
5.4.450.0170.06019.52
5.4.440.0200.06719.41
5.4.430.0230.05319.38
5.4.420.0170.05719.41
5.4.410.0200.05719.06
5.4.400.0300.06718.95
5.4.390.0200.04319.20
5.4.380.0300.07319.15
5.4.370.0300.06718.86
5.4.360.0330.06719.14
5.4.350.0200.08019.10
5.4.340.0130.06019.09
5.4.320.0230.07318.87
5.4.310.0270.06018.85
5.4.300.0230.05018.94
5.4.290.0200.07019.24
5.4.280.0300.03719.24
5.4.270.0170.05319.06
5.4.260.0200.04719.22
5.4.250.0200.05019.05
5.4.240.0200.04019.07
5.4.230.0200.04319.23
5.4.220.0170.06318.97
5.4.210.0200.06318.99
5.4.200.0300.07019.19
5.4.190.0100.07718.93
5.4.180.0330.06019.30
5.4.170.0170.04319.23
5.4.160.0230.07018.85
5.4.150.0400.05718.94
5.4.140.0230.05716.51
5.4.130.0230.06716.45
5.4.120.0130.05316.35
5.4.110.0230.04716.29
5.4.100.0200.07016.45
5.4.90.0230.03716.20
5.4.80.0270.06016.44
5.4.70.0330.03316.44
5.4.60.0230.04016.17
5.4.50.0300.06316.42
5.4.40.0300.04016.54
5.4.30.0300.06316.51
5.4.20.0400.05716.53
5.4.10.0200.05316.43
5.4.00.0270.06315.91
5.3.290.0270.07714.67
5.3.280.0130.08314.68
5.3.270.0330.04314.61
5.3.260.0300.06714.69
5.3.250.0300.03714.85
5.3.240.0270.04714.63
5.3.230.0270.04014.52
5.3.220.0200.05314.50
5.3.210.0170.08314.65
5.3.200.0270.06314.73
5.3.190.0330.07014.54
5.3.180.0270.06714.58
5.3.170.0230.07314.62
5.3.160.0200.04014.65
5.3.150.0300.06714.79
5.3.140.0230.04714.64
5.3.130.0230.07714.80
5.3.120.0230.05014.56
5.3.110.0230.07714.77
5.3.100.0300.06314.03
5.3.90.0300.04714.03
5.3.80.0200.04014.07
5.3.70.0170.07014.00
5.3.60.0270.03014.13
5.3.50.0270.04313.88
5.3.40.0230.03314.07
5.3.30.0230.06713.83
5.3.20.0230.07313.77
5.3.10.0270.06013.67
5.3.00.0270.05013.54
5.2.170.0200.03712.10
5.2.160.0230.03312.10
5.2.150.0170.03712.10
5.2.140.0170.03712.10
5.2.130.0270.05312.10
5.2.120.0170.05312.10
5.2.110.0130.05312.10
5.2.100.0200.05312.10
5.2.90.0100.05712.10
5.2.80.0130.03012.10
5.2.70.0230.05012.10
5.2.60.0200.05712.10
5.2.50.0170.04012.10
5.2.40.0130.04312.10
5.2.30.0170.03012.10
5.2.20.0130.05012.10
5.2.10.0130.02712.10
5.2.00.0200.05712.10
5.1.60.0200.03312.10
5.1.50.0100.03012.10
5.1.40.0200.03012.10
5.1.30.0200.03012.10
5.1.20.0130.03312.10
5.1.10.0130.05012.10
5.1.00.0130.05712.10
5.0.50.0130.01712.10
5.0.40.0070.02012.10
5.0.30.0130.05312.10
5.0.20.0070.02312.10
5.0.10.0070.03712.10
5.0.00.0100.04012.10
4.4.90.0030.01712.10
4.4.80.0030.03312.10
4.4.70.0000.02012.10
4.4.60.0070.01712.10
4.4.50.0030.01712.10
4.4.40.0070.05712.10
4.4.30.0030.02312.10
4.4.20.0070.03312.10
4.4.10.0070.02312.10
4.4.00.0070.04312.10
4.3.110.0070.04012.10
4.3.100.0030.01712.10
4.3.90.0100.02712.10
4.3.80.0230.03312.10
4.3.70.0030.03712.10
4.3.60.0070.03712.10
4.3.50.0070.01712.10
4.3.40.0200.04012.10
4.3.30.0030.02712.10
4.3.20.0070.02012.10
4.3.10.0030.01712.10
4.3.00.0030.03712.10

preferences:
39.66 ms | 401 KiB | 5 Q