3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Productss{ protected $title; protected $category; const CHANGES_SAVED = 'Wijzigingen opgeslagen'; public function __construct($title, $category){ $this->title = $title; $this->category = $category; } 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.70.0150.00318.39
8.3.60.0150.00318.15
8.3.50.0070.00921.08
8.3.40.0150.00018.59
8.3.30.0110.00419.09
8.3.20.0070.00020.15
8.3.10.0080.00022.13
8.3.00.0040.00420.49
8.2.180.0070.00716.75
8.2.170.0070.00722.96
8.2.160.0110.00419.16
8.2.150.0000.00824.18
8.2.140.0110.00424.66
8.2.130.0080.00026.16
8.2.120.0030.00619.56
8.2.110.0030.00622.20
8.2.100.0040.00718.09
8.2.90.0060.00319.23
8.2.80.0040.00417.97
8.2.70.0060.00317.38
8.2.60.0080.00417.68
8.2.50.0000.00818.07
8.2.40.0030.00518.22
8.2.30.0050.00218.19
8.2.20.0000.00717.58
8.2.10.0080.00017.66
8.2.00.0050.00317.65
8.1.280.0150.00725.92
8.1.270.0040.01222.01
8.1.260.0050.00226.35
8.1.250.0000.00828.09
8.1.240.0060.00323.75
8.1.230.0070.00419.07
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0000.00817.35
8.1.190.0000.00817.51
8.1.180.0040.00418.55
8.1.170.0000.00818.56
8.1.160.0000.00822.19
8.1.150.0040.00418.64
8.1.140.0000.00717.45
8.1.130.0000.00717.87
8.1.120.0000.00817.42
8.1.110.0070.00017.36
8.1.100.0000.00717.50
8.1.90.0000.00717.43
8.1.80.0070.00017.53
8.1.70.0000.00717.46
8.1.60.0040.00417.59
8.1.50.0000.01017.57
8.1.40.0000.00817.37
8.1.30.0000.00817.68
8.1.20.0080.00017.66
8.1.10.0040.00417.48
8.1.00.0000.00817.53
8.0.300.0030.00318.77
8.0.290.0080.00017.16
8.0.280.0040.00418.50
8.0.270.0070.00017.26
8.0.260.0030.00316.82
8.0.250.0060.00016.85
8.0.240.0040.00416.84
8.0.230.0000.00716.95
8.0.220.0070.00016.92
8.0.210.0050.00216.92
8.0.200.0070.00016.90
8.0.190.0070.00317.03
8.0.180.0000.00816.96
8.0.170.0040.00416.81
8.0.160.0040.00416.89
8.0.150.0040.00416.88
8.0.140.0000.00816.77
8.0.130.0090.00013.30
8.0.120.0080.00016.88
8.0.110.0050.00216.81
8.0.100.0000.00716.84
8.0.90.0000.00716.75
8.0.80.0120.01416.87
8.0.70.0040.00416.95
8.0.60.0070.00016.89
8.0.50.0000.00716.78
8.0.30.0150.00717.01
8.0.20.0120.01117.40
8.0.10.0040.00416.97
8.0.00.0090.01116.87
7.4.330.0030.00315.15
7.4.320.0030.00316.64
7.4.300.0000.00616.61
7.4.290.0030.00316.63
7.4.280.0040.00416.52
7.4.270.0070.00016.63
7.4.260.0070.00016.40
7.4.250.0070.00016.50
7.4.240.0050.00316.60
7.4.230.0070.00016.70
7.4.220.0100.01616.64
7.4.210.0070.00916.55
7.4.200.0070.00016.70
7.4.190.0020.00516.67
7.4.160.0090.01216.50
7.4.150.0140.01017.40
7.4.140.0140.00717.86
7.4.130.0100.01016.51
7.4.120.0090.00716.63
7.4.110.0120.01216.72
7.4.100.0150.00316.47
7.4.90.0080.00816.38
7.4.80.0120.00619.39
7.4.70.0060.01316.54
7.4.60.0120.00616.47
7.4.50.0000.00516.51
7.4.40.0100.00322.77
7.4.30.0100.01316.56
7.4.00.0030.01215.16
7.3.330.0050.00013.33
7.3.320.0060.00013.39
7.3.310.0030.00316.13
7.3.300.0000.00716.31
7.3.290.0110.00316.32
7.3.280.0090.01016.34
7.3.270.0100.00717.40
7.3.260.0110.00816.38
7.3.250.0090.00716.44
7.3.240.0100.01016.32
7.3.230.0090.01316.43
7.3.210.0080.00816.57
7.3.200.0140.00319.39
7.3.190.0190.00416.29
7.3.180.0100.00616.27
7.3.170.0040.01216.43
7.3.160.0030.01316.45
7.3.120.0030.01314.96
7.2.330.0130.00416.72
7.2.320.0120.00916.77
7.2.310.0140.00316.67
7.2.300.0130.01016.63
7.2.290.0070.01016.65
7.2.00.0030.01219.26
7.1.100.0170.00716.29
7.1.70.0040.00417.15
7.1.60.0110.01419.82
7.1.50.0040.01916.83
7.1.00.0100.03722.51
7.0.200.0000.00716.76
7.0.140.0070.07021.93
7.0.60.0100.08720.04
7.0.50.0030.07717.84
7.0.40.0100.05020.30
7.0.30.0430.04720.11
7.0.20.0270.06320.34
7.0.10.0030.06020.29
7.0.00.0100.06020.32
5.6.280.0000.07721.13
5.6.210.0070.07720.57
5.6.200.0100.08018.18
5.6.190.0100.05020.48
5.6.180.0170.08020.50
5.6.170.0270.04320.47
5.6.160.0070.08020.39
5.6.150.0130.07318.29
5.6.140.0100.03718.20
5.6.130.0070.03718.17
5.6.120.0100.08021.11
5.6.110.0070.07320.98
5.6.100.0100.05721.14
5.6.90.0030.06320.98
5.6.80.0000.04020.52
5.6.70.4630.03720.48
5.5.350.0200.04720.53
5.5.340.0030.07317.98
5.5.330.0030.05020.19
5.5.320.0330.07020.35
5.5.310.0170.04320.36
5.5.300.0100.05018.01
5.5.290.0230.05718.08
5.5.280.0030.04720.79
5.5.270.0230.06720.83
5.5.260.0030.04020.90
5.5.250.0170.07320.79
5.5.240.4370.03020.25
5.4.450.0630.06319.39
5.4.440.0800.06019.70
5.4.430.0330.06019.20
5.4.420.0130.05719.44
5.4.410.0200.07019.17
5.4.400.0430.05318.51
5.4.390.0300.06018.61
5.4.380.0330.04718.59
5.4.370.0270.04018.63
5.4.360.0170.05018.61
5.4.350.0130.05718.74
5.4.340.0170.05318.70
5.4.320.0080.04012.51
5.4.310.0050.03712.51
5.4.300.0050.04212.51
5.4.290.0060.03712.51
5.4.280.0100.03512.40
5.4.270.0040.03712.41
5.4.260.0070.07719.00
5.4.250.0170.04718.95
5.4.240.0030.08019.02
5.4.230.0130.04718.80
5.4.220.0070.05718.80
5.4.210.0130.04719.00
5.4.200.0070.05318.65
5.4.190.0100.05018.83
5.4.180.0170.04318.99
5.4.170.0070.05018.79
5.4.160.0070.07018.82
5.4.150.0100.05019.09
5.4.140.0070.06716.45
5.4.130.0200.03716.64
5.4.120.0100.05716.54
5.4.110.0030.08016.60
5.4.100.0130.06316.44
5.4.90.0100.05016.47
5.4.80.0030.05016.61
5.4.70.0070.04716.70
5.4.60.0170.04016.32
5.4.50.0100.04316.47
5.4.40.0170.04316.41
5.4.30.0070.05016.46
5.4.20.0070.05016.51
5.4.10.0130.04716.39
5.4.00.0200.04015.80
5.3.290.0080.03912.80
5.3.280.0030.06014.79
5.3.270.0170.05014.70
5.3.260.0130.05314.62
5.3.250.0070.05714.75
5.3.240.0000.05714.68
5.3.230.0170.04314.60
5.3.220.0100.04714.66
5.3.210.0170.07014.66
5.3.200.0100.06314.64
5.3.190.0200.05714.60
5.3.180.0070.06014.58
5.3.170.0000.05714.74
5.3.160.0100.04714.58
5.3.150.0200.05714.77
5.3.140.0130.04714.48
5.3.130.0100.05014.66
5.3.120.0170.06314.66
5.3.110.0130.06314.63
5.3.100.0030.05014.03
5.3.90.0100.04313.86
5.3.80.0070.04713.93
5.3.70.0000.05714.05
5.3.60.0130.04313.91
5.3.50.0070.07314.04
5.3.40.0070.05014.04
5.3.30.0070.05014.00
5.3.20.0130.04313.77
5.3.10.0100.05313.66
5.3.00.0130.06713.73
5.2.170.0130.03711.24
5.2.160.0070.03711.16
5.2.150.0100.04711.25
5.2.140.0030.04311.11
5.2.130.0030.04311.07
5.2.120.0030.04011.34
5.2.110.0000.05311.19
5.2.100.0070.03711.18
5.2.90.0030.04011.20
5.2.80.0030.04711.19
5.2.70.0100.03711.19
5.2.60.0070.05311.23
5.2.50.0100.04011.03
5.2.40.0100.04010.97
5.2.30.0100.03711.07
5.2.20.0070.03710.87
5.2.10.0100.05011.09
5.2.00.0070.05010.57
5.1.60.0070.03010.25
5.1.50.0070.0379.97
5.1.40.0030.05310.02
5.1.30.0030.05010.52
5.1.20.0030.04010.44
5.1.10.0030.04010.14
5.1.00.0070.03310.05
5.0.50.0070.0238.53
5.0.40.0000.0308.39
5.0.30.0070.0438.47
5.0.20.0000.0308.30
5.0.10.0070.0238.28
5.0.00.0030.0408.24
4.4.90.0000.0237.48
4.4.80.0100.0207.48
4.4.70.0070.0207.48
4.4.60.0000.0337.48
4.4.50.0070.0237.48
4.4.40.0070.0437.48
4.4.30.0030.0237.48
4.4.20.0000.0237.48
4.4.10.0000.0237.48
4.4.00.0130.0377.48
4.3.110.0000.0237.48
4.3.100.0000.0237.48
4.3.90.0030.0207.48
4.3.80.0030.0337.48
4.3.70.0030.0207.48
4.3.60.0070.0277.48
4.3.50.0000.0237.48
4.3.40.0000.0337.48
4.3.30.0070.0177.48
4.3.20.0030.0307.48
4.3.10.0000.0237.48
4.3.00.0130.0236.90

preferences:
58.76 ms | 401 KiB | 5 Q