3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Productss{ protected $title; protected $category; const CHANGES_SAVED = 'Wijzigingen opgeslagen'; public function someFunction(){ self::CHANGES_SAVED; // CHANGES_SAVED not changeable in this class, it is changeable in a child class } public function getCategory(){ return $this->category; } public function getTitle(){ return $this->title; } } class Order extends Productss{ protected $price; protected $deliver; //const CHANGES_SAVED = 'Wijzigingen nu opgeslagen'; public function __construct($title, $category, $price){ //parent::__construct($title, $category); $this->title = $title; $this->category = $category; $this->price = $price; $this->doWeDeliver(); } public function getPrice(){ return $this->price; } public function getDeliver(){ return $this->deliver; } protected function doWeDeliver(){ $this->deliver = $this->price > 30 ? 'Yes' : 'No' ; } } $order = new Order('CD Brahms', 'Media', '45'); echo 'Product :'.$order->getTitle(); //echo 'Categorie :'.$order->getCategory(); //echo 'Prijs :'.$order->getPrice(); //echo 'Gratis bezorging :'.$order->getDeliver(); //echo Productss::CHANGES_SAVED.'<br />'; // 300 //echo Order::CHANGES_SAVED.'<br />'; // 500

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.0030.01718.56
8.3.50.0120.00821.02
8.3.40.0140.00718.63
8.3.30.0070.01119.08
8.3.20.0000.00820.16
8.3.10.0030.00521.89
8.3.00.0040.00420.64
8.2.180.0130.00716.63
8.2.170.0140.00422.96
8.2.160.0090.00619.20
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00019.68
8.2.110.0060.00322.20
8.2.100.0050.01018.22
8.2.90.0000.00819.23
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0060.00317.93
8.2.50.0030.00618.07
8.2.40.0090.00018.28
8.2.30.0060.00318.02
8.2.20.0000.00717.70
8.2.10.0030.00517.60
8.2.00.0040.00417.70
8.1.280.0070.01325.92
8.1.270.0080.00022.11
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.96
8.1.230.0090.00319.23
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0040.00417.51
8.1.180.0060.00318.80
8.1.170.0090.00018.59
8.1.160.0040.00422.12
8.1.150.0040.00418.68
8.1.140.0040.00417.39
8.1.130.0030.00317.82
8.1.120.0000.00717.53
8.1.110.0050.00317.37
8.1.100.0000.00717.49
8.1.90.0000.00717.39
8.1.80.0020.00517.49
8.1.70.0040.00417.52
8.1.60.0000.00717.49
8.1.50.0050.00217.46
8.1.40.0000.00717.50
8.1.30.0030.00517.55
8.1.20.0060.00317.58
8.1.10.0040.00417.68
8.1.00.0000.00817.51
8.0.300.0070.00018.77
8.0.290.0000.00816.92
8.0.280.0030.00318.39
8.0.270.0000.00717.34
8.0.260.0000.00716.84
8.0.250.0070.00016.99
8.0.240.0030.00516.98
8.0.230.0000.00717.03
8.0.220.0000.00716.94
8.0.210.0070.00016.83
8.0.200.0030.00316.96
8.0.190.0090.00016.90
8.0.180.0040.00416.93
8.0.170.0000.00816.84
8.0.160.0000.00716.97
8.0.150.0000.00716.82
8.0.140.0030.00516.86
8.0.130.0030.00313.35
8.0.120.0040.00416.84
8.0.110.0030.00616.92
8.0.100.0000.00716.96
8.0.90.0040.00416.98
8.0.80.0110.00416.80
8.0.70.0000.00716.71
8.0.60.0070.00016.96
8.0.50.0000.00716.72
8.0.30.0100.00816.89
8.0.20.0120.00717.40
8.0.10.0000.00817.09
8.0.00.0130.00516.72
7.4.330.0050.00215.00
7.4.320.0000.00616.53
7.4.300.0030.00316.55
7.4.290.0030.00316.52
7.4.280.0000.00716.43
7.4.270.0070.00016.56
7.4.260.0000.00716.62
7.4.250.0000.00716.59
7.4.240.0060.00116.55
7.4.230.0000.00716.39
7.4.220.0110.00716.51
7.4.210.0040.01216.57
7.4.200.0030.00316.29
7.4.190.0040.00416.60
7.4.160.0090.00616.26
7.4.150.0040.01517.40
7.4.140.0130.01017.86
7.4.130.0110.01016.44
7.4.120.0100.00816.55
7.4.110.0140.01116.68
7.4.100.0090.00916.52
7.4.90.0110.00716.69
7.4.80.0120.00919.39
7.4.70.0060.01216.70
7.4.60.0070.01016.68
7.4.50.0030.00516.50
7.4.40.0030.01322.77
7.4.30.0140.00316.55
7.4.00.0000.01415.15
7.3.330.0030.00313.13
7.3.320.0060.00013.08
7.3.310.0050.00216.34
7.3.300.0040.00416.32
7.3.290.0140.00716.37
7.3.280.0100.00816.27
7.3.270.0090.00917.40
7.3.260.0090.01816.51
7.3.250.0110.00616.33
7.3.240.0040.01516.59
7.3.230.0130.00516.45
7.3.210.0090.00916.24
7.3.200.0030.01619.39
7.3.190.0130.00616.41
7.3.180.0040.01216.56
7.3.170.0100.00616.37
7.3.160.0130.00316.54
7.3.120.0090.00614.90
7.2.330.0090.01016.52
7.2.320.0090.00616.60
7.2.310.0150.00716.59
7.2.300.0130.00316.83
7.2.290.0030.01316.50
7.2.60.0030.01016.96
7.2.00.0000.01119.45
7.1.200.0000.01415.70
7.1.100.0740.00716.16
7.1.70.0030.00617.14
7.1.60.0000.01017.35
7.1.50.0100.00316.84
7.1.00.0030.06022.28
7.0.200.0080.01116.41
7.0.140.0030.07322.09
7.0.60.0030.07719.94
7.0.50.0070.08017.87
7.0.40.0100.04320.11
7.0.30.0330.07320.06
7.0.20.0200.04720.23
7.0.10.0030.04720.23
7.0.00.0100.03720.20
5.6.280.0030.07020.84
5.6.210.0070.04020.49
5.6.200.0130.07318.18
5.6.190.0030.04320.56
5.6.180.0130.05320.61
5.6.170.0170.05320.51
5.6.160.0170.07720.48
5.6.150.0000.04318.18
5.6.140.0030.05718.17
5.6.130.0130.06718.15
5.6.120.0100.04020.98
5.6.110.0030.09021.06
5.6.100.0100.08720.89
5.6.90.0100.04721.09
5.6.80.0000.04020.39
5.5.350.0070.07020.41
5.5.340.0070.04717.95
5.5.330.0030.04720.44
5.5.320.0200.05320.34
5.5.310.0200.08720.41
5.5.300.0030.04317.95
5.5.290.0030.04017.98
5.5.280.0030.04320.86
5.5.270.0130.07720.89
5.5.260.0130.08020.88
5.5.250.0100.04320.56
5.5.240.0370.07020.05
5.4.450.0470.06319.70
5.4.440.0800.06319.47
5.4.430.0870.06719.47
5.4.420.0400.05019.38
5.4.410.0870.05319.03
5.4.400.0230.04319.31
5.4.390.0470.07319.30
5.4.380.0300.07318.48
5.4.370.0030.06018.84
5.4.360.0270.03718.48
5.4.350.0100.05718.76
5.4.340.0200.05018.80
5.4.320.0060.03512.51
5.4.310.0040.04212.51
5.4.300.0020.04112.51
5.4.290.0060.03712.51
5.4.280.0060.03512.41
5.4.270.0070.04012.41
5.4.260.0100.05018.95
5.4.250.0130.04719.09
5.4.240.0070.05318.94
5.4.230.0130.07318.79
5.4.220.0130.05318.93
5.4.210.0070.06318.95
5.4.200.0030.07318.79
5.4.190.0200.04718.75
5.4.180.0170.05318.80
5.4.170.0030.05718.95
5.4.160.0100.05018.95
5.4.150.0070.05718.73
5.4.140.0130.04316.42
5.4.130.0130.05716.62
5.4.120.0200.05716.47
5.4.110.0030.05716.52
5.4.100.0070.05016.56
5.4.90.0130.04016.44
5.4.80.0100.06016.44
5.4.70.0000.05316.44
5.4.60.0070.05016.46
5.4.50.0030.05016.54
5.4.40.0070.05016.44
5.4.30.0030.05016.59
5.4.20.0070.05016.37
5.4.10.0130.05016.48
5.4.00.0070.06015.80
5.3.290.0050.05312.80
5.3.280.0030.05714.65
5.3.270.0030.05714.78
5.3.260.0070.05714.70
5.3.250.0070.05314.54
5.3.240.0030.06014.84
5.3.230.0200.04714.69
5.3.220.0130.04714.77
5.3.210.0000.05714.57
5.3.200.0170.04014.55
5.3.190.0170.06314.58
5.3.180.0070.05714.64
5.3.170.0100.04714.71
5.3.160.0000.05714.68
5.3.150.0170.04014.59
5.3.140.0100.04714.65
5.3.130.0070.07314.64
5.3.120.0100.04714.69
5.3.110.0030.06014.54
5.3.100.0030.05714.06
5.3.90.0070.05014.24
5.3.80.0030.05314.10
5.3.70.0030.05314.11
5.3.60.0070.05014.01
5.3.50.0030.05713.96
5.3.40.0070.04713.87
5.3.30.0130.06314.01
5.3.20.0100.04313.68
5.3.10.0170.05313.63
5.3.00.0070.05313.64
5.2.170.0030.04711.23
5.2.160.0100.03711.14
5.2.150.0030.04711.24
5.2.140.0030.04311.37
5.2.130.0070.04011.20
5.2.120.0070.03711.27
5.2.110.0000.05311.08
5.2.100.0070.04011.33
5.2.90.0030.04311.02
5.2.80.0070.06011.00
5.2.70.0030.05010.93
5.2.60.0170.03311.14
5.2.50.0030.04310.94
5.2.40.0100.04011.09
5.2.30.0030.04310.96
5.2.20.0100.04011.05
5.2.10.0100.05011.10
5.2.00.0100.03710.82
5.1.60.0000.03710.08
5.1.50.0030.03310.17
5.1.40.0100.02710.08
5.1.30.0030.03710.43
5.1.20.0070.03310.52
5.1.10.0100.03010.08
5.1.00.0100.0309.92
5.0.50.0070.0378.52
5.0.40.0030.0308.66
5.0.30.0030.0408.30
5.0.20.0100.0208.40
5.0.10.0030.0308.27
5.0.00.0030.0508.01
4.4.90.0000.0277.48
4.4.80.0130.0207.48
4.4.70.0000.0237.48
4.4.60.0000.0237.48
4.4.50.0000.0237.48
4.4.40.0070.0277.48
4.4.30.0000.0237.48
4.4.20.0070.0307.48
4.4.10.0100.0237.48
4.4.00.0070.0307.48
4.3.110.0000.0237.48
4.3.100.0070.0177.48
4.3.90.0100.0137.48
4.3.80.0030.0337.48
4.3.70.0070.0177.48
4.3.60.0070.0237.48
4.3.50.0000.0237.48
4.3.40.0000.0407.48
4.3.30.0070.0277.48
4.3.20.0000.0237.48
4.3.10.0000.0277.48
4.3.00.0070.0208.11

preferences:
41.13 ms | 401 KiB | 5 Q