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.60.0100.01018.31
8.3.50.0130.00621.27
8.3.40.0120.00818.88
8.3.30.0090.00619.09
8.3.20.0070.00020.46
8.3.10.0050.00322.09
8.3.00.0080.00020.65
8.2.180.0070.01116.50
8.2.170.0070.00722.96
8.2.160.0070.00719.03
8.2.150.0040.00424.18
8.2.140.0100.01024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.66
8.2.110.0040.00422.28
8.2.100.0040.00718.09
8.2.90.0000.00819.22
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0000.00817.93
8.2.50.0000.00918.07
8.2.40.0040.00418.12
8.2.30.0060.00317.98
8.2.20.0030.00517.68
8.2.10.0040.00417.70
8.2.00.0040.00417.69
8.1.280.0130.00625.92
8.1.270.0050.00322.06
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00623.85
8.1.230.0110.00019.15
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0000.00817.35
8.1.190.0040.00417.43
8.1.180.0080.00018.93
8.1.170.0040.00418.70
8.1.160.0040.00422.06
8.1.150.0080.00018.64
8.1.140.0000.00717.37
8.1.130.0030.00317.82
8.1.120.0040.00417.46
8.1.110.0030.00317.37
8.1.100.0000.00717.33
8.1.90.0070.00017.45
8.1.80.0000.00717.43
8.1.70.0000.00717.38
8.1.60.0040.00417.47
8.1.50.0000.00717.56
8.1.40.0000.00817.54
8.1.30.0040.00417.63
8.1.20.0030.00517.52
8.1.10.0000.00917.48
8.1.00.0000.00717.53
8.0.300.0000.00718.77
8.0.290.0040.00417.18
8.0.280.0040.00418.33
8.0.270.0030.00517.14
8.0.260.0030.00316.74
8.0.250.0000.00717.01
8.0.240.0000.00816.93
8.0.230.0030.00316.84
8.0.220.0000.00716.89
8.0.210.0000.00716.89
8.0.200.0040.00416.90
8.0.190.0060.00316.84
8.0.180.0040.00416.86
8.0.170.0050.00316.98
8.0.160.0040.00416.83
8.0.150.0000.00716.72
8.0.140.0040.00416.75
8.0.130.0030.00613.25
8.0.120.0030.00616.88
8.0.110.0050.00316.80
8.0.100.0040.00416.98
8.0.90.0000.00716.93
8.0.80.0120.00916.95
8.0.70.0030.00616.96
8.0.60.0000.00816.88
8.0.50.0000.00716.80
8.0.30.0100.01216.93
8.0.20.0080.01217.40
8.0.10.0000.00716.97
8.0.00.0090.00916.78
7.4.330.0060.00015.00
7.4.320.0030.00316.52
7.4.300.0070.00016.62
7.4.290.0040.00416.50
7.4.280.0030.00316.36
7.4.270.0030.00316.50
7.4.260.0030.00316.60
7.4.250.0000.00816.63
7.4.240.0040.00316.64
7.4.230.0030.00316.49
7.4.220.0130.00316.46
7.4.210.0060.01116.55
7.4.200.0000.00716.55
7.4.190.0040.00416.47
7.4.160.0090.00616.60
7.4.150.0000.01717.40
7.4.140.0100.00817.86
7.4.130.0100.00716.58
7.4.120.0130.00716.53
7.4.110.0050.01816.50
7.4.100.0090.01516.37
7.4.90.0100.00716.46
7.4.80.0030.01519.39
7.4.70.0090.00616.50
7.4.60.0080.00816.51
7.4.50.0050.00016.51
7.4.40.0060.00922.77
7.4.30.0080.01116.58
7.4.00.0090.00714.90
7.3.330.0030.00313.33
7.3.320.0000.00513.29
7.3.310.0030.00316.21
7.3.300.0030.00316.18
7.3.290.0100.01016.35
7.3.280.0040.01116.29
7.3.270.0080.00917.40
7.3.260.0100.01016.79
7.3.250.0080.01216.50
7.3.240.0150.00416.59
7.3.230.0120.00616.48
7.3.210.0130.00316.49
7.3.200.0090.00919.39
7.3.190.0080.01116.33
7.3.180.0100.00616.51
7.3.170.0060.00916.43
7.3.160.0090.01216.22
7.3.120.0090.00914.78
7.3.110.0060.00914.62
7.3.100.0070.00614.84
7.3.90.0070.00914.78
7.3.80.0070.00414.80
7.3.70.0050.00614.78
7.3.60.0050.00914.87
7.3.50.0040.00714.86
7.3.40.0110.00414.71
7.3.30.0100.00214.64
7.3.20.0010.00816.46
7.3.10.0080.00516.65
7.3.00.0070.00616.69
7.2.330.0090.00916.44
7.2.320.0130.00316.77
7.2.310.0070.01016.77
7.2.300.0110.00716.54
7.2.290.0100.00716.45
7.2.250.0050.01415.10
7.2.240.0070.01315.18
7.2.230.0060.00914.95
7.2.220.0050.00914.91
7.2.210.0090.00515.16
7.2.200.0040.01215.01
7.2.190.0040.01014.97
7.2.180.0060.00915.05
7.2.170.0120.00314.97
7.2.130.0030.01416.95
7.2.120.0040.01117.06
7.2.110.0060.00917.13
7.2.100.0090.00616.67
7.2.90.0060.00616.70
7.2.80.0040.01117.05
7.2.70.0000.01217.05
7.2.60.0120.00516.74
7.2.50.0030.01316.96
7.2.40.0070.00317.16
7.2.30.0070.00716.97
7.2.20.0040.01516.97
7.2.10.0030.00717.06
7.2.00.0020.01218.30
7.1.330.0090.00515.56
7.1.320.0060.00515.73
7.1.310.0100.00415.82
7.1.300.0080.00415.70
7.1.290.0120.00115.69
7.1.280.0020.01315.56
7.1.270.0050.00815.68
7.1.260.0030.01215.75
7.1.250.0040.01115.62
7.1.200.0120.00015.74
7.1.100.0050.01616.34
7.1.70.0000.00716.93
7.1.60.0060.01919.82
7.1.50.0070.01316.89
7.1.00.0000.03722.31
7.0.200.0000.00816.75
7.0.140.0000.07021.95
7.0.60.0230.07019.95
7.0.50.0070.07317.93
7.0.40.0170.08020.02
7.0.30.0230.03720.06
7.0.20.0430.06720.30
7.0.10.0330.08020.21
7.0.00.0000.09320.23
5.6.280.0070.07321.14
5.6.210.0100.08320.63
5.6.200.0170.07018.14
5.6.190.0170.08020.53
5.6.180.4100.04720.55
5.6.170.0130.04320.44
5.6.160.0100.08020.46
5.6.150.0070.03718.13
5.6.140.0000.07018.21
5.6.130.0030.07018.11
5.6.120.0130.08021.13
5.6.110.0130.08321.04
5.6.100.0170.08020.96
5.6.90.0030.08721.13
5.6.80.0270.05020.38
5.6.70.0170.08020.39
5.5.350.0030.04020.49
5.5.340.0130.07317.98
5.5.330.0030.06020.40
5.5.320.0270.07320.27
5.5.310.0100.04720.27
5.5.300.0070.06718.09
5.5.290.0070.07017.94
5.5.280.0170.04020.81
5.5.270.0030.05320.78
5.5.260.0070.06320.68
5.5.250.0000.07320.59
5.5.240.0030.06320.37
5.4.450.0770.05719.58
5.4.440.0800.05319.48
5.4.430.0130.05319.38
5.4.420.0230.07019.31
5.4.410.0130.05719.41
5.4.400.0300.05018.76
5.4.390.0170.07718.78
5.4.380.0230.06018.59
5.4.370.0800.05018.73
5.4.360.0730.05318.70
5.4.350.0870.05018.51
5.4.340.0800.05018.51
5.4.320.0060.04212.52
5.4.310.0040.05012.51
5.4.300.0040.04712.52
5.4.290.0070.04412.51
5.4.280.0060.03612.40
5.4.270.0080.03812.40
5.4.260.0070.05718.75
5.4.250.0200.06318.95
5.4.240.0070.05318.96
5.4.230.0200.04719.02
5.4.220.0100.05318.96
5.4.210.0000.08018.93
5.4.200.0100.05718.61
5.4.190.0100.05318.79
5.4.180.0170.05018.75
5.4.170.0100.06318.71
5.4.160.0100.05018.96
5.4.150.0070.06018.98
5.4.140.0070.06016.43
5.4.130.0030.05716.48
5.4.120.0170.05716.46
5.4.110.0230.05316.61
5.4.100.0100.05716.46
5.4.90.0100.05016.54
5.4.80.0070.05016.57
5.4.70.0100.04716.53
5.4.60.0170.04716.50
5.4.50.0170.04016.59
5.4.40.0100.04716.53
5.4.30.0100.04716.59
5.4.20.0100.04316.47
5.4.10.0170.06316.38
5.4.00.0030.05315.91
5.3.290.0080.04712.80
5.3.280.0070.05314.64
5.3.270.0170.06714.70
5.3.260.0100.05014.84
5.3.250.0170.04014.70
5.3.240.0030.05314.70
5.3.230.0200.03714.44
5.3.220.0170.04714.56
5.3.210.0100.05014.57
5.3.200.0070.07014.80
5.3.190.0070.05714.74
5.3.180.0070.07314.65
5.3.170.0130.07014.56
5.3.160.0100.07314.71
5.3.150.0070.06714.74
5.3.140.0070.05014.55
5.3.130.0170.06314.60
5.3.120.0070.05314.56
5.3.110.0070.06014.70
5.3.100.0070.06014.07
5.3.90.0030.07314.21
5.3.80.0030.06014.11
5.3.70.0030.05714.00
5.3.60.0100.06714.07
5.3.50.0070.04714.04
5.3.40.0030.05313.94
5.3.30.0100.04713.98
5.3.20.0030.05713.81
5.3.10.0070.07013.73
5.3.00.0100.05713.87
5.2.170.0070.03711.32
5.2.160.0070.03711.13
5.2.150.0030.04710.98
5.2.140.0070.04711.14
5.2.130.0130.04311.10
5.2.120.0030.05311.10
5.2.110.0070.05311.27
5.2.100.0070.05311.08
5.2.90.0070.04311.27
5.2.80.0030.05011.20
5.2.70.0070.05710.93
5.2.60.0030.04311.16
5.2.50.0170.04711.10
5.2.40.0070.05310.84
5.2.30.0000.05711.00
5.2.20.0070.04011.04
5.2.10.0170.04011.05
5.2.00.0030.04010.71
5.1.60.0030.04010.21
5.1.50.0000.04710.05
5.1.40.0030.0339.98
5.1.30.0170.04310.56
5.1.20.0070.03710.54
5.1.10.0170.03310.26
5.1.00.0070.03710.06
5.0.50.0030.0408.55
5.0.40.0070.0238.62
5.0.30.0030.0438.07
5.0.20.0030.0408.25
5.0.10.0030.0308.25
5.0.00.0000.0478.13
4.4.90.0030.0237.45
4.4.80.0030.0307.45
4.4.70.0030.0277.45
4.4.60.0000.0237.45
4.4.50.0000.0237.45
4.4.40.0030.0437.45
4.4.30.0070.0277.45
4.4.20.0000.0337.45
4.4.10.0000.0237.45
4.4.00.0070.0407.45
4.3.110.0100.0237.45
4.3.100.0000.0307.45
4.3.90.0000.0307.45
4.3.80.0030.0437.45
4.3.70.0030.0237.45
4.3.60.0100.0137.45
4.3.50.0030.0207.45
4.3.40.0000.0407.45
4.3.30.0030.0237.45
4.3.20.0000.0337.45
4.3.10.0030.0277.45
4.3.00.0200.0176.90

preferences:
58.16 ms | 401 KiB | 5 Q