3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Products{ // Properties protected $_title; protected $_category; // Methods public function __construct($title, $category){ $this->_title = $title; $this->_category = $category; } public function getCategory(){ return $this->_category; } public function getTitle(){ return $this->_title; } } class Order extends Products{ // Properties protected $_price; protected $_deliver; // Methods public function __construct($title, $category, $price){ $this->_title = $title; $this->_category = $category; $this->_price = $price; $this->freeDomesticShipment(); // method called } public function getPrice(){ return $this->_price; } public function getDeliver(){ return $this->_deliver; } protected function freeDomesticShipment(){ $this->_deliver = $this->_price > 30 ? 'Yes' : 'No' ; } } $order = new Order('CD Brahms', 'Media', '45'); echo $order->getTitle(); // displays CD Brahms

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.0150.00018.77
8.3.30.0110.00319.25
8.3.20.0030.00520.18
8.3.10.0060.00323.70
8.3.00.0080.00019.25
8.2.170.0070.00722.96
8.2.160.0140.00020.16
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0000.00722.29
8.2.110.0000.00922.31
8.2.100.0100.00317.72
8.2.90.0080.00019.09
8.2.80.0080.00017.97
8.2.70.0040.00417.63
8.2.60.0050.00317.92
8.2.50.0000.00818.07
8.2.40.0040.00419.75
8.2.30.0030.00619.72
8.2.20.0040.00417.57
8.2.10.0000.00718.14
8.2.00.0070.00317.61
8.1.270.0080.00023.71
8.1.260.0000.00826.35
8.1.250.0060.00328.09
8.1.240.0060.00323.98
8.1.230.0080.00319.14
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00617.47
8.1.190.0030.00617.35
8.1.180.0000.00819.13
8.1.170.0000.00818.44
8.1.160.0000.00721.93
8.1.150.0090.00018.63
8.1.140.0040.00417.40
8.1.130.0030.00317.79
8.1.120.0040.00417.51
8.1.110.0000.00717.46
8.1.100.0020.00517.48
8.1.90.0050.00317.39
8.1.80.0030.00617.36
8.1.70.0070.00017.41
8.1.60.0080.00017.48
8.1.50.0000.00917.55
8.1.40.0040.00417.50
8.1.30.0050.00317.59
8.1.20.0020.00517.66
8.1.10.0000.00717.48
8.1.00.0040.00417.44
8.0.300.0040.00420.66
8.0.290.0000.00717.17
8.0.280.0000.00718.47
8.0.270.0040.00417.23
8.0.260.0030.00317.28
8.0.250.0030.00316.98
8.0.240.0030.00317.04
8.0.230.0000.00717.03
8.0.220.0000.00816.97
8.0.210.0000.00716.91
8.0.200.0030.00316.84
8.0.190.0000.00716.84
8.0.180.0040.00416.92
8.0.170.0000.00816.91
8.0.160.0000.00816.93
8.0.150.0040.00416.82
8.0.140.0000.00916.76
8.0.130.0030.00313.40
8.0.120.0050.00316.83
8.0.110.0000.00716.93
8.0.100.0070.00016.79
8.0.90.0000.00716.71
8.0.80.0090.00616.86
8.0.70.0040.00316.91
8.0.60.0000.00716.86
8.0.50.0070.00016.90
8.0.30.0090.01017.04
8.0.20.0150.01017.40
8.0.10.0050.00216.89
8.0.00.0040.01516.69
7.4.330.0000.00515.09
7.4.320.0060.00016.62
7.4.300.0040.00416.44
7.4.290.0000.00716.50
7.4.280.0000.00716.58
7.4.270.0040.00416.45
7.4.260.0040.00416.52
7.4.250.0030.00616.62
7.4.240.0050.00216.60
7.4.230.0030.00316.68
7.4.220.0090.00916.71
7.4.210.0060.01016.51
7.4.200.0000.00716.61
7.4.190.0040.00416.57
7.4.160.0070.01716.48
7.4.150.0110.00617.40
7.4.140.0130.00517.86
7.4.130.0070.01216.39
7.4.120.0140.00316.45
7.4.110.0170.00016.59
7.4.100.0030.01616.45
7.4.90.0070.01016.61
7.4.80.0070.01119.39
7.4.70.0100.00616.58
7.4.60.0130.00316.35
7.4.50.0040.00416.66
7.4.40.0100.00722.77
7.4.30.0070.01016.25
7.4.00.0080.00815.08
7.3.330.0030.00313.27
7.3.320.0050.00013.32
7.3.310.0030.00316.32
7.3.300.0030.00316.24
7.3.290.0040.01116.29
7.3.280.0080.00916.28
7.3.270.0070.01017.40
7.3.260.0190.00316.36
7.3.250.0090.01216.56
7.3.240.0170.00016.38
7.3.230.0080.01216.39
7.3.210.0130.00416.64
7.3.200.0090.01319.39
7.3.190.0120.00816.33
7.3.180.0090.00616.55
7.3.170.0100.00716.59
7.3.160.0160.00016.72
7.3.120.0030.01314.56
7.3.10.0030.01016.47
7.3.00.0110.00316.35
7.2.330.0070.01016.64
7.2.320.0100.00716.51
7.2.310.0070.01016.87
7.2.300.0120.00616.80
7.2.290.0130.00316.43
7.2.130.0070.00716.90
7.2.120.0000.01517.04
7.2.110.0070.00717.03
7.2.100.0100.00616.88
7.2.90.0000.01416.94
7.2.80.0120.00417.09
7.2.70.0100.00716.81
7.2.60.0070.00316.80
7.2.50.0030.00617.00
7.2.40.0030.01017.03
7.2.30.0100.00317.02
7.2.20.0040.01117.05
7.2.10.0060.00617.01
7.2.00.0070.00716.96
7.1.250.0030.01015.73
7.1.70.0120.00617.14
7.1.60.0000.01019.46
7.1.50.0030.01716.86
7.1.00.0030.07722.43
7.0.200.0060.00616.63
7.0.140.0200.05722.10
7.0.60.0070.05720.05
7.0.50.0070.03717.86
7.0.40.0000.04320.04
7.0.30.0430.04720.07
7.0.20.0230.04720.33
7.0.10.0100.07320.33
7.0.00.0000.04320.04
5.6.280.0070.06320.80
5.6.210.0000.08320.57
5.6.200.0000.04718.16
5.6.190.0030.05720.48
5.6.180.0100.05020.50
5.6.170.0270.03320.46
5.6.160.0070.08320.61
5.6.150.0100.07718.19
5.6.140.0070.08018.21
5.6.130.0000.04318.27
5.6.120.0100.08020.91
5.6.110.0170.06720.96
5.6.100.0130.06021.14
5.6.90.0030.09021.01
5.6.80.0130.07320.52
5.6.70.4470.04320.40
5.5.350.0300.07720.54
5.5.340.0130.07317.95
5.5.330.0070.04320.18
5.5.320.0270.05320.34
5.5.310.0300.04020.42
5.5.300.0030.06017.98
5.5.290.0030.06017.98
5.5.280.0100.08020.82
5.5.270.0070.04720.85
5.5.260.0130.07020.81
5.5.250.0100.08020.59
5.5.240.0330.06020.08
5.4.450.0070.03719.31
5.4.440.0030.03719.30
5.4.430.1330.04319.23
5.4.420.0300.03319.07
5.4.410.0230.03719.38
5.4.400.0230.03719.05
5.4.390.0170.05019.16
5.4.380.0170.03719.34
5.4.370.0270.04319.21
5.4.360.0270.05718.89
5.4.350.0170.04718.91
5.4.340.0100.04019.02
5.4.320.0130.07719.16
5.4.310.0030.03718.78
5.4.300.0100.04318.78
5.4.290.0100.03019.30
5.4.280.0070.04319.16
5.4.270.0030.03718.88
5.4.260.0130.03319.00
5.4.250.0030.03719.11
5.4.240.0330.04718.89
5.4.230.1570.03719.10
5.4.220.0070.03319.11
5.4.210.0070.03319.20
5.4.200.0670.03718.88
5.4.190.0000.04019.15
5.4.180.0030.04719.20
5.4.170.0700.04319.15
5.4.160.1630.04019.13
5.4.150.0100.03319.15
5.4.140.0070.03316.56
5.4.130.0570.04016.50
5.4.120.1470.03316.38
5.4.110.0000.06716.59
5.4.100.0070.04016.61
5.4.90.0130.03716.47
5.4.80.0030.03316.57
5.4.70.0030.04016.40
5.4.60.0500.03716.43
5.4.50.1600.03316.42
5.4.40.1570.03316.27
5.4.30.1700.03716.26
5.4.20.0070.03016.16
5.4.10.0070.04016.48
5.4.00.1100.04015.95
5.3.290.0000.04014.65
5.3.280.0000.04014.52
5.3.270.0570.07014.62
5.3.260.1500.04014.63
5.3.250.1800.04014.53
5.3.240.0100.04314.66
5.3.230.0030.06714.83
5.3.220.0730.03014.55
5.3.210.0030.07714.80
5.3.200.0030.04014.55
5.3.190.0630.04014.63
5.3.180.0030.05014.48
5.3.170.0100.03314.56
5.3.160.0870.06314.49
5.3.150.0070.06714.57
5.3.140.0000.05014.48
5.3.130.1170.04714.78
5.3.120.0000.05714.52
5.3.110.0030.04714.53
5.3.100.0970.05713.99
5.3.90.0030.04014.04
5.3.80.0100.04314.15
5.3.70.0770.05314.05
5.3.60.0070.07313.94
5.3.50.0100.03714.07
5.3.40.0600.04313.87
5.3.30.0070.07013.92
5.3.20.0000.03713.71
5.3.10.1370.03313.75
5.3.00.1830.04013.88
5.2.170.0100.02711.10
5.2.160.0000.03011.39
5.2.150.0000.03011.14
5.2.140.0500.03311.16
5.2.130.0030.06011.27
5.2.120.0030.05711.17
5.2.110.0070.04311.26
5.2.100.1100.03711.34
5.2.90.0000.03011.03
5.2.80.0000.03711.01
5.2.70.0000.04311.06
5.2.60.0030.05311.29
5.2.50.0070.04010.93
5.2.40.0070.02310.98
5.2.30.0400.02011.13
5.2.20.1030.02711.04
5.2.10.0000.03010.93
5.2.00.0000.03010.68
5.1.60.0030.02710.06
5.1.50.0000.03010.02
5.1.40.0930.02010.14
5.1.30.0000.05710.32
5.1.20.0070.05010.26
5.1.10.0070.0539.93
5.1.00.0000.03010.31
5.0.50.0070.0338.61
5.0.40.0030.0438.36
5.0.30.0000.0638.13
5.0.20.0000.0238.29
5.0.10.0000.0238.31
5.0.00.0030.0308.18
4.4.90.0000.0307.93
4.4.80.0000.0307.93
4.4.70.0030.0237.93
4.4.60.0000.0177.93
4.4.50.0000.0177.93
4.4.40.0070.0237.93
4.4.30.0030.0177.93
4.4.20.0030.0337.93
4.4.10.0030.0137.93
4.4.00.0000.0307.93
4.3.110.0330.0177.93
4.3.100.0630.0207.93
4.3.90.0570.0177.93
4.3.80.0000.0337.93
4.3.70.0000.0207.93
4.3.60.0000.0207.93
4.3.50.0000.0177.93
4.3.40.0000.0507.93
4.3.30.0000.0177.93
4.3.20.0000.0177.93
4.3.10.0030.0237.93
4.3.00.0030.0207.93

preferences:
40.13 ms | 400 KiB | 5 Q