3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Products{ // Properties protected $_title; protected $_category; protected $_p = 'kak'; // 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 // Methods public function __construct($title, $category){ parent::__construct($title, $category); $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' ; } } class Add extends Order{ // Properties protected $_price; protected $_deliver; // Methods public function __construct($title, $category, $price){ parent::__construct($title, $category); $this->_price = $price; $this->freeDomesticShipment(); // method called } public function getPrice(){ return $this->_price; } public function getP(){ return $this->_p; } public function getDeliver(){ return $this->_deliver; } protected function freeDomesticShipment(){ $this->_deliver = $this->_price > 30 ? 'Yes' : 'No' ; } } $order = new Add('CD Brahms', 'Media', '45'); echo 'Product: '.$order->getTitle(); echo 'Categorie: '.$order->getCategory(); echo 'Prijs: '.$order->getPrice(); echo 'Gratis bezorging: '.$order->getDeliver();

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.0040.01118.15
8.3.50.0130.00821.99
8.3.40.0110.00418.73
8.3.30.0040.01118.85
8.3.20.0080.00018.64
8.3.10.0000.00821.10
8.3.00.0080.00021.90
8.2.180.0100.00616.38
8.2.170.0090.00622.96
8.2.160.0040.01620.47
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00421.04
8.2.110.0030.00720.27
8.2.100.0080.00417.70
8.2.90.0040.00419.23
8.2.80.0000.00917.97
8.2.70.0040.00417.75
8.2.60.0050.00317.80
8.2.50.0040.00418.07
8.2.40.0040.00418.21
8.2.30.0070.00019.61
8.2.20.0000.00717.84
8.2.10.0040.00417.88
8.2.00.0030.00617.70
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0060.00322.52
8.1.230.0090.00322.56
8.1.220.0000.00818.77
8.1.210.0000.00819.04
8.1.200.0000.00917.35
8.1.190.0080.00017.55
8.1.180.0040.00418.10
8.1.170.0080.00018.53
8.1.160.0040.00419.00
8.1.150.0070.00318.68
8.1.140.0000.00717.50
8.1.130.0000.00717.98
8.1.120.0040.00417.61
8.1.110.0020.00517.48
8.1.100.0040.00417.48
8.1.90.0040.00417.54
8.1.80.0070.00017.37
8.1.70.0070.00017.50
8.1.60.0040.00417.65
8.1.50.0080.00017.45
8.1.40.0000.00817.62
8.1.30.0080.00017.74
8.1.20.0060.00317.67
8.1.10.0000.00817.67
8.1.00.0040.00417.54
8.0.300.0000.00720.20
8.0.290.0050.00317.30
8.0.280.0000.00718.42
8.0.270.0000.00717.38
8.0.260.0000.00716.85
8.0.250.0000.00717.05
8.0.240.0050.00517.05
8.0.230.0030.00317.00
8.0.220.0070.00016.83
8.0.210.0040.00416.91
8.0.200.0030.00316.98
8.0.190.0070.00017.01
8.0.180.0000.00816.99
8.0.170.0000.00717.02
8.0.160.0030.00316.91
8.0.150.0000.00716.86
8.0.140.0020.01016.93
8.0.130.0050.00013.34
8.0.120.0050.00316.89
8.0.110.0080.00016.79
8.0.100.0050.00216.98
8.0.90.0040.00416.75
8.0.80.0030.01516.99
8.0.70.0080.00016.94
8.0.60.0000.00716.93
8.0.50.0000.00716.82
8.0.30.0060.01217.12
8.0.20.0140.01217.40
8.0.10.0040.00416.98
8.0.00.0120.00716.88
7.4.330.0050.00016.84
7.4.320.0060.00016.50
7.4.300.0060.00016.65
7.4.290.0050.00216.64
7.4.280.0030.00316.61
7.4.270.0070.00016.50
7.4.260.0000.00613.34
7.4.250.0050.00316.42
7.4.240.0030.00316.65
7.4.230.0030.00316.58
7.4.220.0160.01016.50
7.4.210.0090.00716.65
7.4.200.0030.00316.65
7.4.190.0000.00716.79
7.4.160.0090.00616.66
7.4.150.0080.01117.40
7.4.140.0120.00617.86
7.4.130.0130.01116.67
7.4.120.0040.01316.61
7.4.110.0090.00916.55
7.4.100.0140.00716.63
7.4.90.0100.00716.55
7.4.80.0090.00919.39
7.4.70.0110.00616.51
7.4.60.0070.01016.57
7.4.50.0030.00616.40
7.4.40.0080.00322.77
7.4.30.0130.00316.71
7.4.00.0060.00614.94
7.3.330.0030.00313.16
7.3.320.0000.00613.32
7.3.310.0000.00716.32
7.3.300.0030.00316.32
7.3.290.0110.00716.34
7.3.280.0080.00916.36
7.3.270.0220.00317.40
7.3.260.0110.00818.24
7.3.250.0070.01516.32
7.3.240.0110.00816.62
7.3.230.0200.00716.39
7.3.210.0030.01416.38
7.3.200.0090.01219.39
7.3.190.0040.01816.51
7.3.180.0100.00716.30
7.3.170.0080.00816.50
7.3.160.0050.01116.52
7.3.120.0040.01114.95
7.2.330.0110.00716.62
7.2.320.0120.00616.82
7.2.310.0090.01316.61
7.2.300.0070.01716.70
7.2.290.0130.00916.87
7.2.00.0030.01019.19
7.1.100.0030.01017.79
7.1.70.0000.00717.12
7.1.60.0040.00717.22
7.1.50.0040.01816.90
7.1.00.0030.03322.36
7.0.200.0090.00416.37
7.0.140.0030.07322.06
7.0.100.0030.08720.03
7.0.90.0370.07719.95
7.0.80.0100.07720.05
7.0.70.0070.07320.15
7.0.60.0100.08020.02
7.0.50.0030.04020.42
7.0.40.0030.05320.05
7.0.30.0100.08020.10
7.0.20.0030.06020.02
7.0.10.0200.07720.09
7.0.00.0000.06020.06
5.6.280.0000.07321.14
5.6.250.0170.05320.80
5.6.240.0070.05720.57
5.6.230.0070.08020.74
5.6.220.0000.07020.52
5.6.210.0030.07020.58
5.6.200.0000.08021.19
5.6.190.0070.06021.08
5.6.180.0030.07021.06
5.6.170.0000.08721.08
5.6.160.0130.06021.11
5.6.150.0070.05321.04
5.6.140.0100.05321.06
5.6.130.0170.07021.09
5.6.120.0030.08721.02
5.6.110.0030.04721.14
5.6.100.0070.09321.18
5.6.90.0230.06721.01
5.6.80.0200.06720.45
5.6.70.0100.06720.50
5.6.60.0070.06020.44
5.6.50.0130.07720.49
5.6.40.0030.06720.31
5.6.30.0170.06320.34
5.6.20.0100.07720.36
5.6.10.0070.08020.38
5.6.00.0030.06020.30
5.5.380.0030.04720.44
5.5.370.0100.04720.56
5.5.360.0070.07320.38
5.5.350.0070.08320.44
5.5.340.0070.06720.78
5.5.330.0100.08020.85
5.5.320.0000.07720.66
5.5.310.0170.07320.92
5.5.300.0100.07720.75
5.5.290.0170.07720.94
5.5.280.0100.04320.86
5.5.270.0100.08720.84
5.5.260.0130.06020.91
5.5.250.0170.06720.73
5.5.240.0100.08020.29
5.5.230.0030.08320.28
5.5.220.0130.05720.26
5.5.210.0000.04320.31
5.5.200.0000.06720.14
5.5.190.0100.07320.12
5.5.180.0000.09320.23
5.5.160.0100.07720.25
5.5.150.0170.06720.28
5.5.140.0000.05320.17
5.5.130.0070.08320.30
5.5.120.0100.05720.10
5.5.110.0030.04720.12
5.5.100.0070.06320.09
5.5.90.0070.07720.12
5.5.80.0100.07320.00
5.5.70.0030.08020.16
5.5.60.0100.04020.16
5.5.50.0070.03720.02
5.5.40.0070.05720.14
5.5.30.0030.08020.11
5.5.20.0130.06720.11
5.5.10.0130.06720.14
5.5.00.0070.06720.11
5.4.450.0070.07319.27
5.4.440.0000.04719.27
5.4.430.0070.05319.44
5.4.420.0100.07319.36
5.4.410.0030.04719.25
5.4.400.0130.06019.19
5.4.390.0100.08019.13
5.4.380.0070.07319.04
5.4.370.0000.05719.09
5.4.360.0170.06719.09
5.4.350.0070.05019.05
5.4.340.0100.07319.18
5.4.320.0130.07319.20
5.4.310.0130.07018.85
5.4.300.0100.04319.13
5.4.290.0000.08019.16
5.4.280.0100.06718.92
5.4.270.0070.07019.13
5.4.260.0100.04319.23
5.4.250.0170.07319.04
5.4.240.0030.08019.12
5.4.230.0100.07319.11
5.4.220.0130.07019.22
5.4.210.0130.06319.12
5.4.200.0000.06018.94
5.4.190.0070.08019.08
5.4.180.0070.05018.89
5.4.170.0230.03719.08
5.4.160.0000.07719.10
5.4.150.0070.04319.18
5.4.140.0130.05316.50
5.4.130.0070.07316.40
5.4.120.0070.06716.45
5.4.110.0070.06716.44
5.4.100.0230.03316.49
5.4.90.0100.06716.32
5.4.80.0030.06716.51
5.4.70.0100.06016.33
5.4.60.0100.06316.43
5.4.50.0100.06716.36
5.4.40.0070.07016.43
5.4.30.0130.06316.25
5.4.20.0070.03716.33
5.4.10.0100.04016.40
5.4.00.0030.03715.75
5.3.290.0000.07314.75
5.3.280.0000.08314.68
5.3.270.0130.07014.59
5.3.260.0030.06714.71
5.3.250.0030.04014.55
5.3.240.0070.07314.74
5.3.230.0070.05314.63
5.3.220.0100.07314.55
5.3.210.0030.06714.70
5.3.200.0100.06014.58
5.3.190.0170.06714.70
5.3.180.0000.08014.57
5.3.170.0070.04314.55
5.3.160.0030.05314.70
5.3.150.0100.08314.57
5.3.140.0070.07314.63
5.3.130.0070.07714.71
5.3.120.0130.07014.55
5.3.110.0030.04014.59
5.3.100.0030.04314.07
5.3.90.0030.04314.00
5.3.80.0100.03714.02
5.3.70.0000.04013.93
5.3.60.0000.04314.16
5.3.50.0070.03314.03
5.3.40.0000.04013.96
5.3.30.0000.04014.02
5.3.20.0000.03713.83
5.3.10.0070.03013.81
5.3.00.0000.03713.75
5.2.170.0000.03012.25
5.2.160.0000.03312.25
5.2.150.0030.03312.25
5.2.140.0030.03012.25
5.2.130.0000.03012.25
5.2.120.0000.03012.25
5.2.110.0000.03012.25
5.2.100.0000.03012.25
5.2.90.0030.02312.25
5.2.80.0000.03312.25
5.2.70.0000.03312.25
5.2.60.0070.02312.25
5.2.50.0030.02712.25
5.2.40.0000.03012.25
5.2.30.0070.02012.25
5.2.20.0030.03012.25
5.2.10.0130.01712.25
5.2.00.0000.03012.25
5.1.60.0000.04012.25
5.1.50.0000.05012.25
5.1.40.0030.02312.25
5.1.30.0070.02312.25
5.1.20.0070.02012.25
5.1.10.0000.02712.25
5.1.00.0030.03012.25
5.0.50.0030.02012.25
5.0.40.0000.02012.25
5.0.30.0000.05012.25
5.0.20.0070.01312.25
5.0.10.0000.02012.25
5.0.00.0070.02312.25
4.4.90.0000.02012.25
4.4.80.0030.01312.25
4.4.70.0000.01712.25
4.4.60.0030.01312.25
4.4.50.0030.01312.25
4.4.40.0000.03012.25
4.4.30.0030.01312.25
4.4.20.0070.01012.25
4.4.10.0000.01712.25
4.4.00.0070.02012.25
4.3.110.0000.02012.25
4.3.100.0030.01312.25
4.3.90.0000.01712.25
4.3.80.0030.03012.25
4.3.70.0000.01712.25
4.3.60.0030.03012.25
4.3.50.0030.02012.25
4.3.40.0070.02312.25
4.3.30.0000.01712.25
4.3.20.0000.01712.25
4.3.10.0000.01312.25
4.3.00.0000.01712.25

preferences:
48.49 ms | 401 KiB | 5 Q