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 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 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.0110.00418.80
8.3.50.0120.01121.99
8.3.40.0090.00618.83
8.3.30.0120.00318.61
8.3.20.0000.00818.91
8.3.10.0040.00421.05
8.3.00.0050.00321.79
8.2.180.0060.01316.63
8.2.170.0150.00022.96
8.2.160.0130.00020.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00420.95
8.2.110.0100.00020.34
8.2.100.0110.00017.71
8.2.90.0040.00419.05
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0040.00417.91
8.2.50.0000.00818.07
8.2.40.0040.00417.92
8.2.30.0000.00719.35
8.2.20.0080.00017.61
8.2.10.0040.00417.74
8.2.00.0050.00717.61
8.1.280.0070.01125.92
8.1.270.0040.00423.99
8.1.260.0120.00826.35
8.1.250.0070.00028.09
8.1.240.0060.00322.42
8.1.230.0080.00421.03
8.1.220.0080.00018.77
8.1.210.0030.00518.91
8.1.200.0060.00317.00
8.1.190.0000.00817.40
8.1.180.0050.00318.10
8.1.170.0030.00518.49
8.1.160.0000.00718.86
8.1.150.0070.00318.48
8.1.140.0080.00017.28
8.1.130.0030.00517.79
8.1.120.0040.00417.42
8.1.110.0000.00817.34
8.1.100.0000.00717.25
8.1.90.0070.00017.38
8.1.80.0020.00517.26
8.1.70.0030.00317.36
8.1.60.0040.00417.62
8.1.50.0060.00317.41
8.1.40.0070.00017.51
8.1.30.0050.00217.63
8.1.20.0040.00417.45
8.1.10.0090.00017.48
8.1.00.0060.00317.44
8.0.300.0040.00419.89
8.0.290.0030.00616.90
8.0.280.0030.00318.33
8.0.270.0000.00717.23
8.0.260.0030.00516.85
8.0.250.0040.00416.91
8.0.240.0040.00616.99
8.0.230.0070.00316.97
8.0.220.0030.00316.89
8.0.210.0000.00816.80
8.0.200.0000.00617.00
8.0.190.0080.00016.99
8.0.180.0030.00516.96
8.0.170.0030.00516.82
8.0.160.0000.00716.94
8.0.150.0000.00816.84
8.0.140.0060.00316.75
8.0.130.0060.00013.25
8.0.120.0030.00516.89
8.0.110.0030.00516.84
8.0.100.0080.00016.79
8.0.90.0030.00517.00
8.0.80.0000.01516.87
8.0.70.0000.00716.91
8.0.60.0000.00716.75
8.0.50.0030.00616.81
8.0.30.0140.00517.14
8.0.20.0100.01017.40
8.0.10.0040.00416.94
8.0.00.0090.00916.72
7.4.330.0020.00216.87
7.4.320.0000.00616.46
7.4.300.0000.00716.57
7.4.290.0030.00316.39
7.4.280.0000.00816.36
7.4.270.0000.00616.58
7.4.260.0060.00013.31
7.4.250.0060.00316.53
7.4.240.0050.00316.58
7.4.230.0000.00716.38
7.4.220.0190.00016.52
7.4.210.0100.00716.51
7.4.200.0000.00716.67
7.4.190.0050.00316.64
7.4.160.0060.01016.50
7.4.150.0170.00017.40
7.4.140.0100.00717.86
7.4.130.0130.00416.51
7.4.120.0040.01316.67
7.4.110.0060.01216.41
7.4.100.0100.01716.51
7.4.90.0110.00716.37
7.4.80.0150.00919.39
7.4.70.0120.00916.57
7.4.60.0060.01016.34
7.4.50.0040.00416.45
7.4.40.0030.00922.77
7.4.30.0100.00616.53
7.4.10.0090.00914.95
7.4.00.0100.00814.92
7.3.330.0030.00313.15
7.3.320.0050.00213.24
7.3.310.0040.00416.21
7.3.300.0030.00316.27
7.3.290.0070.00716.36
7.3.280.0080.00816.38
7.3.270.0070.01017.40
7.3.260.0110.00718.24
7.3.250.0070.01016.55
7.3.240.0070.01016.28
7.3.230.0170.00616.39
7.3.210.0090.00916.54
7.3.200.0160.00619.39
7.3.190.0100.01016.56
7.3.180.0030.01216.42
7.3.170.0160.00616.28
7.3.160.0120.00416.44
7.3.130.0060.01214.93
7.3.120.0090.00814.98
7.3.110.0030.01614.69
7.3.100.0090.00614.90
7.3.90.0070.00614.93
7.3.80.0080.00614.85
7.3.70.0030.01014.82
7.3.60.0030.01114.61
7.3.50.0040.00714.78
7.3.40.0090.00414.71
7.3.30.0070.01014.71
7.3.20.0060.00816.55
7.3.10.0060.01016.59
7.3.00.0060.01016.70
7.2.330.0070.01016.50
7.2.320.0080.01216.28
7.2.310.0150.00616.48
7.2.300.0110.01116.54
7.2.290.0060.01216.69
7.2.260.0080.00915.06
7.2.250.0090.01014.92
7.2.240.0040.01014.92
7.2.230.0090.00615.03
7.2.220.0090.00414.73
7.2.210.0040.00914.80
7.2.200.0050.00914.76
7.2.190.0090.00414.87
7.2.180.0080.00715.01
7.2.170.0050.01114.70
7.2.160.0070.00514.88
7.2.150.0050.01316.78
7.2.140.0090.00716.70
7.2.130.0080.00716.76
7.2.120.0090.00316.81
7.2.110.0080.00716.75
7.2.100.0080.00816.67
7.2.90.0040.01116.78
7.2.80.0020.01416.81
7.2.70.0050.01016.70
7.2.60.0070.00616.79
7.2.50.0080.00816.66
7.2.40.0080.00716.86
7.2.30.0080.00316.87
7.2.20.0040.01416.61
7.2.10.0070.00716.80
7.2.00.0050.01017.51
7.1.330.0050.00815.66
7.1.320.0050.01015.61
7.1.310.0030.01015.70
7.1.300.0060.00415.72
7.1.290.0030.00915.78
7.1.280.0090.00315.54
7.1.270.0070.00815.50
7.1.260.0050.01115.66
7.1.250.0070.00815.69
7.1.240.0040.00915.69
7.1.230.0070.00815.42
7.1.220.0040.01015.67
7.1.210.0060.00515.57
7.1.200.0040.00815.64
7.1.190.0060.00615.57
7.1.180.0060.00315.72
7.1.170.0020.01015.60
7.1.160.0060.00715.67
7.1.150.0060.00515.67
7.1.140.0050.00615.69
7.1.130.0070.00515.73
7.1.120.0050.00615.73
7.1.110.0000.01215.79
7.1.100.0060.00716.56
7.1.90.0020.01215.65
7.1.80.0030.00915.59
7.1.70.0050.00516.25
7.1.60.0040.01116.97
7.1.50.0060.01215.97
7.1.40.0000.01315.59
7.1.30.0050.00715.63
7.1.20.0030.01015.60
7.1.10.0080.00515.80
7.1.00.0060.02117.85
7.0.330.0030.00715.35
7.0.320.0060.00815.30
7.0.310.0070.00815.48
7.0.300.0020.01515.25
7.0.290.0050.00615.37
7.0.280.0050.00815.48
7.0.270.0070.00915.50
7.0.260.0060.00315.34
7.0.250.0070.00515.29
7.0.240.0000.01315.25
7.0.230.0060.00515.38
7.0.220.0020.00815.53
7.0.210.0050.00715.38
7.0.200.0030.00715.31
7.0.190.0040.00715.35
7.0.180.0060.00615.45
7.0.170.0020.01215.25
7.0.160.0040.00715.19
7.0.150.0000.01415.41
7.0.140.0040.03017.65
7.0.130.0030.00815.39
7.0.120.0070.00415.22
7.0.110.0050.00615.52
7.0.100.0050.03317.47
7.0.90.0030.03117.59
7.0.80.0050.03217.40
7.0.70.0080.02516.77
7.0.60.0080.01917.04
7.0.50.0080.01817.17
7.0.40.0010.02215.46
7.0.30.0040.02115.62
7.0.20.0050.01715.57
7.0.10.0060.01715.61
7.0.00.0060.01715.60
5.6.400.0080.00714.38
5.6.390.0070.00414.31
5.6.380.0070.00714.50
5.6.370.0100.00514.46
5.6.360.0080.00814.42
5.6.350.0040.01014.25
5.6.340.0060.00814.59
5.6.330.0020.01414.64
5.6.320.0050.00714.43
5.6.310.0050.00714.41
5.6.300.0050.00714.07
5.6.290.0050.00814.47
5.6.280.0050.02816.62
5.6.270.0090.00314.43
5.6.260.0050.00814.49
5.6.250.0060.03316.38
5.6.240.0110.02216.53
5.6.230.0070.03116.44
5.6.220.0000.02316.67
5.6.210.0070.01816.43
5.6.200.0090.01716.72
5.6.190.0080.01416.61
5.6.180.0040.02016.66
5.6.170.0060.02116.66
5.6.160.0040.02816.63
5.6.150.0060.01616.69
5.6.140.0050.02116.65
5.6.130.0060.02516.71
5.6.120.0060.01716.68
5.6.110.0040.02116.58
5.6.100.0060.01916.64
5.6.90.0040.02116.65
5.6.80.0030.02016.41
5.6.70.0020.02416.36
5.6.60.0040.02016.32
5.6.50.0050.01616.44
5.6.40.0070.01316.32
5.6.30.0060.01816.46
5.6.20.0050.01816.37
5.6.10.0050.01916.23
5.6.00.0040.02116.31
5.5.380.0090.02516.48
5.5.370.0070.02316.41
5.5.360.0090.03016.42
5.5.350.0050.01916.18
5.5.340.0090.01916.61
5.5.330.0080.01816.51
5.5.320.0100.01316.41
5.5.310.0070.02416.33
5.5.300.0020.02116.52
5.5.290.0020.02116.53
5.5.280.0070.01816.69
5.5.270.0040.01716.56
5.5.260.0040.02116.48
5.5.250.0060.01816.59
5.5.240.0080.01516.27
5.5.230.0030.01916.36
5.5.220.0050.01816.27
5.5.210.0030.02316.14
5.5.200.0040.01816.19
5.5.190.0070.01516.30
5.5.180.0060.02116.29
5.5.170.0040.01014.28
5.5.160.0100.01516.27
5.5.150.0020.02716.36
5.5.140.0050.01916.17
5.5.130.0050.01816.18
5.5.120.0090.02316.30
5.5.110.0080.02916.16
5.5.100.0050.03316.28
5.5.90.0090.02916.18
5.5.80.0030.02216.14
5.5.70.0040.02916.18
5.5.60.0030.03016.30
5.5.50.0060.01916.18
5.5.40.0090.02816.18
5.5.30.0070.03116.25
5.5.20.0060.03416.31
5.5.10.0020.01916.01
5.5.00.0070.03116.10
5.4.450.0080.01413.78
5.4.440.0080.01414.09
5.4.430.0020.01913.88
5.4.420.0070.01413.95
5.4.410.0020.01713.97
5.4.400.0040.01413.81
5.4.390.0030.01813.86
5.4.380.0010.02013.82
5.4.370.0010.01813.83
5.4.360.0010.01913.76
5.4.350.0050.01613.71
5.4.340.0060.01613.87
5.4.330.0060.00611.17
5.4.320.0050.01613.87
5.4.310.0020.01713.79
5.4.300.0050.01313.69
5.4.290.0040.02913.79
5.4.280.0010.02113.74
5.4.270.0020.01713.73
5.4.260.0040.01813.62
5.4.250.0040.03013.68
5.4.240.0060.02713.67
5.4.230.0040.01713.72
5.4.220.0050.03013.86
5.4.210.0080.02613.76
5.4.200.0090.02213.81
5.4.190.0060.02513.65
5.4.180.0050.02813.78
5.4.170.0030.02813.68
5.4.160.0070.02713.60
5.4.150.0020.02013.63
5.4.140.0030.02912.97
5.4.130.0040.02512.92
5.4.120.0030.03113.00
5.4.110.0040.02812.83
5.4.100.0020.02312.81
5.4.90.0070.02512.93
5.4.80.0080.01512.89
5.4.70.0060.01612.78
5.4.60.0020.02912.81
5.4.50.0060.02612.88
5.4.40.0030.02912.92
5.4.30.0070.02812.74
5.4.20.0060.02812.83
5.4.10.0040.02612.85
5.4.00.0030.02112.75
5.3.290.0060.01512.02
5.3.280.0030.01811.88
5.3.270.0050.03112.06
5.3.260.0070.02712.03
5.3.250.0050.03111.93
5.3.240.0060.03011.99
5.3.230.0050.02211.99
5.3.220.0070.02911.98
5.3.210.0070.03211.95
5.3.200.0060.02711.90
5.3.190.0080.02812.02
5.3.180.0060.02511.94
5.3.170.0070.02612.05
5.3.160.0030.02412.00
5.3.150.0060.02711.96
5.3.140.0040.01811.94
5.3.130.0100.02712.00
5.3.120.0080.01912.04
5.3.110.0050.03211.96
5.3.100.0080.02411.87
5.3.90.0060.02711.90
5.3.80.0060.02911.78
5.3.70.0080.02711.72
5.3.60.0080.02711.84
5.3.50.0080.02511.81
5.3.40.0060.02911.74
5.3.30.0070.01611.75
5.3.20.0060.01711.74
5.3.10.0070.02511.60
5.3.00.0060.02811.61
5.2.170.0030.06312.11
5.2.160.0070.05012.11
5.2.150.0100.05712.11
5.2.140.0030.05312.11
5.2.130.0070.05712.11
5.2.120.0030.06012.11
5.2.110.0030.05312.11
5.2.100.0100.05712.11
5.2.90.0070.05712.11
5.2.80.0100.05712.11
5.2.70.0030.04012.11
5.2.60.0030.05312.11
5.2.50.0030.06012.11
5.2.40.0070.05712.11
5.2.30.0000.03312.11
5.2.20.0100.02712.11
5.2.10.0030.06312.11
5.2.00.0100.05712.11
5.1.60.0070.03312.11
5.1.50.0030.05312.11
5.1.40.0030.05312.11
5.1.30.0030.04712.11
5.1.20.0000.03012.11
5.1.10.0030.05312.11
5.1.00.0070.03012.11
5.0.50.0000.05012.11
5.0.40.0000.04712.11
5.0.30.0000.05312.11
5.0.20.0030.04712.11
5.0.10.0030.03012.11
5.0.00.0000.05312.11
4.4.90.0000.03012.11
4.4.80.0000.03712.11
4.4.70.0030.02712.11
4.4.60.0030.03012.11
4.4.50.0000.03312.11
4.4.40.0000.04712.11
4.4.30.0000.01712.11
4.4.20.0070.02312.11
4.4.10.0030.03012.11
4.4.00.0070.05012.11
4.3.110.0070.03012.11
4.3.100.0000.02712.11
4.3.90.0000.03312.11
4.3.80.0030.04712.11
4.3.70.0030.03012.11
4.3.60.0000.03712.11
4.3.50.0030.03312.11
4.3.40.0000.05312.11
4.3.30.0030.02712.11
4.3.20.0030.03312.11
4.3.10.0000.03712.11
4.3.00.0000.03012.11

preferences:
42.71 ms | 400 KiB | 5 Q