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.0140.00718.27
8.3.50.0090.00721.09
8.3.40.0070.01118.67
8.3.30.0040.01119.09
8.3.20.0050.00220.46
8.3.10.0050.00322.05
8.3.00.0040.00420.57
8.2.180.0110.00416.63
8.2.170.0040.01122.96
8.2.160.0090.00619.08
8.2.150.0080.00024.18
8.2.140.0180.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00419.54
8.2.110.0060.00322.13
8.2.100.0080.00318.22
8.2.90.0040.00419.08
8.2.80.0080.00017.97
8.2.70.0030.00617.63
8.2.60.0030.00517.91
8.2.50.0080.00018.07
8.2.40.0000.00818.09
8.2.30.0040.00418.13
8.2.20.0000.00817.71
8.2.10.0040.00417.65
8.2.00.0040.00417.69
8.1.280.0120.00925.92
8.1.270.0080.00022.03
8.1.260.0000.00726.35
8.1.250.0050.00228.09
8.1.240.0030.00623.84
8.1.230.0100.00019.16
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0000.00917.25
8.1.190.0040.00417.49
8.1.180.0040.00418.77
8.1.170.0040.00418.59
8.1.160.0000.00722.18
8.1.150.0000.00718.61
8.1.140.0030.00517.46
8.1.130.0000.00717.83
8.1.120.0000.00717.48
8.1.110.0080.00017.52
8.1.100.0000.00817.39
8.1.90.0000.00717.41
8.1.80.0030.00517.55
8.1.70.0030.00317.47
8.1.60.0030.00617.45
8.1.50.0040.00417.58
8.1.40.0090.00017.42
8.1.30.0050.00217.60
8.1.20.0040.00417.66
8.1.10.0040.00417.57
8.1.00.0040.00417.49
8.0.300.0040.00418.77
8.0.290.0040.00417.04
8.0.280.0000.00718.52
8.0.270.0030.00317.23
8.0.260.0030.00316.84
8.0.250.0000.00716.97
8.0.240.0000.00817.01
8.0.230.0030.00316.84
8.0.220.0000.00716.95
8.0.210.0000.00716.83
8.0.200.0000.00716.95
8.0.190.0000.00916.96
8.0.180.0030.00316.96
8.0.170.0040.00417.02
8.0.160.0000.00816.94
8.0.150.0050.00216.86
8.0.140.0000.00816.73
8.0.130.0040.00413.37
8.0.120.0000.00916.96
8.0.110.0040.00416.82
8.0.100.0000.00716.85
8.0.90.0040.00416.84
8.0.80.0040.01116.83
8.0.70.0030.00516.79
8.0.60.0040.00416.68
8.0.50.0000.00716.96
8.0.30.0140.00817.17
8.0.20.0130.00917.44
8.0.10.0000.00816.85
8.0.00.0090.01216.69
7.4.330.0030.00315.00
7.4.320.0000.00616.52
7.4.300.0030.00316.41
7.4.290.0000.00716.40
7.4.280.0060.00316.60
7.4.270.0070.00016.54
7.4.260.0030.00316.52
7.4.250.0000.00816.46
7.4.240.0000.00716.45
7.4.230.0000.00716.40
7.4.220.0030.01616.49
7.4.210.0030.01316.59
7.4.200.0070.00016.32
7.4.190.0020.00516.77
7.4.160.0110.00516.63
7.4.150.0100.00717.40
7.4.140.0140.00517.86
7.4.130.0080.01016.67
7.4.120.0090.00716.63
7.4.110.0100.01316.55
7.4.100.0060.01316.64
7.4.90.0130.00616.61
7.4.80.0000.01819.39
7.4.70.0060.00916.52
7.4.60.0110.00616.53
7.4.50.0000.00616.37
7.4.40.0060.01122.77
7.4.30.0130.00716.57
7.4.00.0040.01214.72
7.3.330.0030.00313.10
7.3.320.0000.00513.07
7.3.310.0000.00716.27
7.3.300.0070.00016.27
7.3.290.0140.00716.29
7.3.280.0070.01016.33
7.3.270.0100.01317.40
7.3.260.0100.00916.47
7.3.250.0100.00716.47
7.3.240.0120.01216.44
7.3.230.0070.01416.39
7.3.210.0160.00016.25
7.3.200.0140.00519.39
7.3.190.0070.01116.39
7.3.180.0140.00716.52
7.3.170.0060.01016.42
7.3.160.0120.00416.29
7.3.120.0090.00615.04
7.3.110.0080.00514.64
7.3.100.0040.00814.88
7.3.90.0070.00714.52
7.3.80.0110.00015.13
7.3.70.0000.01514.87
7.3.60.0070.00714.96
7.3.50.0070.01014.68
7.3.40.0000.01714.55
7.3.30.0000.01215.02
7.3.20.0140.00016.69
7.3.10.0070.00716.40
7.3.00.0060.00616.54
7.2.330.0120.01216.67
7.2.320.0130.00916.70
7.2.310.0090.00616.43
7.2.300.0150.00316.69
7.2.290.0130.00316.59
7.2.240.0040.00715.08
7.2.230.0060.00614.96
7.2.220.0060.00915.26
7.2.210.0080.00814.85
7.2.200.0060.00915.07
7.2.190.0000.01714.80
7.2.180.0060.00915.13
7.2.170.0030.01315.21
7.2.160.0100.00714.99
7.2.150.0060.00916.82
7.2.140.0090.00616.87
7.2.130.0060.00816.98
7.2.120.0090.00516.98
7.2.110.0070.00716.93
7.2.100.0020.01116.94
7.2.90.0050.01017.11
7.2.80.0070.00916.92
7.2.70.0080.00917.05
7.2.60.0050.00817.03
7.2.50.0040.00916.92
7.2.40.0060.00816.92
7.2.30.0060.00916.89
7.2.20.0070.00516.89
7.2.10.0080.00716.68
7.2.00.0060.00617.57
7.1.330.0060.01015.50
7.1.320.0000.01215.88
7.1.310.0070.01015.74
7.1.300.0060.00615.71
7.1.290.0040.01115.77
7.1.280.0100.00315.94
7.1.270.0060.00915.79
7.1.260.0030.01016.02
7.1.250.0020.01115.70
7.1.240.0090.00515.51
7.1.230.0030.00915.81
7.1.220.0080.00815.82
7.1.210.0030.01015.81
7.1.200.0120.00415.53
7.1.190.0090.00515.75
7.1.180.0120.00215.63
7.1.170.0110.00615.58
7.1.160.0070.00715.74
7.1.150.0050.00715.62
7.1.140.0100.00415.76
7.1.130.0060.00715.78
7.1.120.0070.00315.84
7.1.110.0060.00515.69
7.1.100.0050.00716.40
7.1.90.0080.00615.75
7.1.80.0100.00515.74
7.1.70.0080.00516.11
7.1.60.0050.01317.13
7.1.50.0040.01116.25
7.1.40.0060.00715.50
7.1.30.0050.01015.52
7.1.20.0100.00315.57
7.1.10.0030.00915.77
7.1.00.0050.01717.76
7.0.330.0060.01015.36
7.0.320.0030.00815.41
7.0.310.0050.00715.39
7.0.300.0080.00715.39
7.0.290.0060.00615.34
7.0.280.0040.00615.48
7.0.270.0100.00515.26
7.0.260.0070.01015.20
7.0.250.0040.00915.34
7.0.240.0050.00915.34
7.0.230.0040.00615.15
7.0.220.0120.00415.24
7.0.210.0070.00815.35
7.0.200.0050.00515.93
7.0.190.0060.00715.36
7.0.180.0010.00915.43
7.0.170.0060.00515.19
7.0.160.0050.00715.39
7.0.150.0080.00615.34
7.0.140.0040.03017.45
7.0.130.0070.00515.48
7.0.120.0080.00815.40
7.0.110.0030.00815.38
7.0.100.0030.01015.31
7.0.90.0070.00615.31
7.0.80.0030.01115.26
7.0.70.0060.00615.26
7.0.60.0080.03016.88
7.0.50.0060.02916.20
7.0.40.0060.03115.55
7.0.30.0130.01715.69
7.0.20.0140.02315.58
7.0.10.0110.02715.65
7.0.00.0080.02915.64
5.6.380.0090.00314.60
5.6.370.0060.00614.51
5.6.360.0050.01114.60
5.6.350.0030.01114.38
5.6.340.0020.01414.70
5.6.330.0060.00614.55
5.6.320.0070.00714.44
5.6.310.0090.00614.46
5.6.300.0060.00614.25
5.6.290.0090.00814.42
5.6.280.0050.03016.51
5.6.270.0080.00614.31
5.6.260.0040.00914.30
5.6.250.0050.00714.32
5.6.240.0050.00814.51
5.6.230.0080.00514.25
5.6.220.0040.00914.38
5.6.210.0070.03016.53
5.6.200.0120.01615.63
5.6.190.0080.02816.38
5.6.180.1360.02116.38
5.6.170.0090.01816.40
5.6.160.0060.03116.43
5.6.150.0090.01515.63
5.6.140.0030.02715.57
5.6.130.0030.02815.66
5.6.120.0060.02816.64
5.6.110.0060.03116.50
5.6.100.0060.03016.73
5.6.90.0030.02116.69
5.6.80.0080.03016.40
5.6.70.0110.02616.40
5.6.60.0060.00714.16
5.6.50.0060.00714.30
5.6.40.0090.00214.15
5.6.30.0050.00714.13
5.6.20.0070.00614.12
5.6.10.0060.00314.18
5.6.00.0030.00914.18
5.5.380.0030.00611.21
5.5.370.0070.00211.24
5.5.360.0080.00311.30
5.5.350.0000.01714.30
5.5.340.0060.02313.52
5.5.330.0030.01814.35
5.5.320.0140.02614.25
5.5.310.0090.01614.41
5.5.300.0050.02813.47
5.5.290.0050.02313.45
5.5.280.0020.02014.46
5.5.270.0080.01914.47
5.5.260.0070.02014.37
5.5.250.0020.02314.38
5.5.240.0050.03114.16
5.5.230.0040.00511.18
5.5.220.0060.00511.18
5.5.210.0050.00511.18
5.5.200.0020.00711.21
5.5.190.0070.00411.23
5.5.180.0030.00411.27
5.5.170.0090.00211.18
5.5.160.0050.00511.30
5.5.150.0020.00711.18
5.5.140.0040.00411.21
5.5.130.0050.00411.27
5.5.120.0000.01011.22
5.5.110.0030.00811.35
5.5.100.0060.00311.26
5.5.90.0090.00311.26
5.5.80.0020.00911.18
5.5.70.0040.00811.18
5.5.60.0050.00411.29
5.5.50.0060.00511.18
5.5.40.0050.00411.24
5.5.30.0020.00611.29
5.5.20.0040.00411.27
5.5.10.0020.00611.26
5.5.00.0050.00411.26
5.4.450.0280.02614.06
5.4.440.0270.02113.99
5.4.430.0090.03113.90
5.4.420.0070.02813.95
5.4.410.0100.02014.00
5.4.400.0160.02013.75
5.4.390.0340.02313.71
5.4.380.0090.02313.71
5.4.370.0190.02613.68
5.4.360.0270.01713.61
5.4.350.0260.02113.74
5.4.340.0280.01413.66
5.4.330.0080.00511.34
5.4.320.0040.01711.62
5.4.310.0030.01811.63
5.4.300.0080.01611.62
5.4.290.0050.01411.62
5.4.280.0060.01611.62
5.4.270.0040.01911.65
5.4.260.0060.02213.72
5.4.250.0070.02613.70
5.4.240.0100.02413.80
5.4.230.0050.02213.69
5.4.220.0080.02213.71
5.4.210.0050.02313.77
5.4.200.0060.02013.75
5.4.190.0040.03013.79
5.4.180.0080.02113.75
5.4.170.0070.02613.72
5.4.160.0050.02213.80
5.4.150.0090.02513.75
5.4.140.0110.02412.99
5.4.130.0080.01912.91
5.4.120.0050.02112.92
5.4.110.0040.02512.97
5.4.100.0020.02312.92
5.4.90.0090.02112.92
5.4.80.0050.02012.95
5.4.70.0080.01712.94
5.4.60.0070.02112.94
5.4.50.0020.02412.91
5.4.40.0070.01912.91
5.4.30.0070.01812.92
5.4.20.0040.02312.91
5.4.10.0080.02012.91
5.4.00.0050.02612.70
5.3.290.0060.01611.72
5.3.280.0060.02012.33
5.3.270.0050.02712.27
5.3.260.0060.02412.35
5.3.250.0060.01912.35
5.3.240.0050.02312.34
5.3.230.0040.02212.35
5.3.220.0040.02512.31
5.3.210.0040.02612.28
5.3.200.0030.02612.36
5.3.190.0080.01912.36
5.3.180.0070.01912.33
5.3.170.0090.02412.34
5.3.160.0050.02112.36
5.3.150.0090.01612.28
5.3.140.0060.02412.33
5.3.130.0090.01712.27
5.3.120.0030.02812.33
5.3.110.0050.02412.35
5.3.100.0040.02212.13
5.3.90.0040.02112.13
5.3.80.0030.02512.13
5.3.70.0090.01612.15
5.3.60.0070.01712.09
5.3.50.0090.01812.07
5.3.40.0030.02212.10
5.3.30.0050.01812.12
5.3.20.0060.02212.04
5.3.10.0090.02412.06
5.3.00.0090.02612.01
5.2.170.0030.01911.20
5.2.160.0050.02311.17
5.2.150.0060.01611.17
5.2.140.0100.01511.20
5.2.130.0030.02311.10
5.2.120.0030.01711.10
5.2.110.0090.01311.18
5.2.100.0040.02011.15
5.2.90.0040.01611.15
5.2.80.0050.01611.22
5.2.70.0030.02511.18
5.2.60.0040.01811.11
5.2.50.0060.02211.16
5.2.40.0040.01611.15
5.2.30.0030.01811.15
5.2.20.0040.01911.13
5.2.10.0030.01711.07
5.2.00.0030.01611.02
5.1.60.0020.01610.76
5.1.50.0050.01610.85
5.1.40.0080.01110.84
5.1.30.0040.01610.92
5.1.20.0060.01310.93
5.1.10.0040.01410.84
5.1.00.0030.01710.76
5.0.50.0040.01110.36
5.0.40.0050.00910.23
5.0.30.0010.01810.25
5.0.20.0050.00910.19
5.0.10.0030.01210.20
5.0.00.0020.01910.23
4.4.90.0020.0129.93
4.4.80.0020.0139.93
4.4.70.0000.0119.93
4.4.60.0020.0089.93
4.4.50.0010.0129.93
4.4.40.0030.0139.93
4.4.30.0020.0129.93
4.4.20.0030.0089.93
4.4.10.0020.0099.93
4.4.00.0030.0149.93
4.3.110.0030.0099.93
4.3.100.0050.0069.93
4.3.90.0040.0079.93
4.3.80.0030.0139.93
4.3.70.0030.0099.93
4.3.60.0010.0139.93
4.3.50.0020.0109.93
4.3.40.0030.0179.93
4.3.30.0040.0079.93
4.3.20.0010.0109.93
4.3.10.0030.0099.93
4.3.00.0060.0129.75

preferences:
41.42 ms | 401 KiB | 5 Q