3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ReadOnly { protected $realProperty; private $dynamicProperty = array(); function __construct() { $realProperty = 12; $this->members['test'] = 'read-only'; } public function __set($name, $value) { if($name=='test') { if(isset($this->dynamicProperty[$name])) throw new Exception("Can't overwrite $name"); $props[$name] = $value; } } } class Writeable extends ReadOnly { function __construct($value) { parent::__construct(); $this->realProperty = 25; // ok $this->test = $value; // causes Fatal Error } } $test = new Writeable('write to me');

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.0090.00918.80
8.3.60.0040.01118.68
8.3.50.0090.00922.04
8.3.40.0120.00318.80
8.3.30.0070.00719.04
8.3.20.0040.00420.25
8.3.10.0080.00022.27
8.3.00.0040.00422.70
8.2.190.0130.00716.75
8.2.180.0030.01416.63
8.2.170.0140.00322.96
8.2.160.0110.00420.77
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0070.00026.16
8.2.120.0080.00019.13
8.2.110.0000.01021.13
8.2.100.0150.00017.72
8.2.90.0000.00819.10
8.2.80.0000.00917.97
8.2.70.0060.00317.50
8.2.60.0000.00817.91
8.2.50.0050.00318.10
8.2.40.0000.00920.42
8.2.30.0040.00417.90
8.2.20.0000.00717.43
8.2.10.0040.00417.48
8.2.00.0000.00817.51
8.1.280.0100.00325.92
8.1.270.0080.00023.88
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0090.00023.98
8.1.230.0040.00817.77
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0060.00317.23
8.1.180.0050.00318.10
8.1.170.0030.00618.37
8.1.160.0030.00322.10
8.1.150.0030.00718.48
8.1.140.0040.00417.21
8.1.130.0030.00317.76
8.1.120.0020.00517.28
8.1.110.0000.00717.28
8.1.100.0040.00417.22
8.1.90.0080.00017.29
8.1.80.0070.00017.31
8.1.70.0000.00717.30
8.1.60.0000.00817.46
8.1.50.0040.00417.40
8.1.40.0000.00717.37
8.1.30.0080.00017.52
8.1.20.0030.00517.36
8.1.10.0070.00017.39
8.1.00.0070.00017.41
8.0.300.0070.00018.77
8.0.290.0030.00616.75
8.0.280.0040.00418.38
8.0.270.0030.00317.11
8.0.260.0030.00316.75
8.0.250.0000.00716.89
8.0.240.0060.00316.89
8.0.230.0040.00416.79
8.0.220.0080.00016.71
8.0.210.0000.00716.81
8.0.200.0060.00016.88
8.0.190.0040.00416.89
8.0.180.0000.00716.86
8.0.170.0040.00416.85
8.0.160.0000.00816.74
8.0.150.0030.00316.72
8.0.140.0000.00816.73
8.0.130.0000.00613.24
8.0.120.0030.00616.75
8.0.110.0000.00716.78
8.0.100.0000.00716.82
8.0.90.0030.00516.62
8.0.80.0070.00716.84
8.0.70.0000.00716.83
8.0.60.0070.00016.84
8.0.50.0080.00016.84
8.0.30.0150.00717.17
8.0.20.0150.00317.40
8.0.10.0050.00317.07
8.0.00.0150.00316.77
7.4.330.0070.00015.14
7.4.320.0030.00316.51
7.4.300.0040.00416.59
7.4.290.0030.00316.60
7.4.280.0000.00716.53
7.4.270.0030.00316.45
7.4.260.0000.00716.51
7.4.250.0000.00716.39
7.4.240.0040.00416.44
7.4.230.0040.00416.50
7.4.220.0100.00716.63
7.4.210.0100.00716.42
7.4.200.0070.00016.57
7.4.190.0040.00416.59
7.4.160.0080.00816.44
7.4.150.0100.00717.40
7.4.140.0130.00517.86
7.4.130.0120.00716.43
7.4.120.0120.00516.56
7.4.110.0150.00416.31
7.4.100.0070.01016.45
7.4.90.0100.00716.31
7.4.80.0030.01516.37
7.4.70.0060.01216.38
7.4.60.0130.01016.46
7.4.50.0000.00816.34
7.4.40.0110.00322.77
7.4.30.0060.00916.59
7.4.00.0070.00715.05
7.3.330.0060.00013.38
7.3.320.0000.00513.34
7.3.310.0030.00316.22
7.3.300.0030.00316.24
7.3.290.0030.01016.29
7.3.280.0110.00616.34
7.3.270.0120.00917.40
7.3.260.0070.01016.52
7.3.250.0080.00916.44
7.3.240.0190.00316.35
7.3.230.0070.01116.61
7.3.210.0070.01016.35
7.3.200.0130.01019.39
7.3.190.0090.01316.51
7.3.180.0090.01016.45
7.3.170.0080.00816.34
7.3.160.0030.01216.39
7.3.120.0000.01315.13
7.2.330.0030.01616.45
7.2.320.0030.01316.91
7.2.310.0120.00616.64
7.2.300.0110.00716.76
7.2.290.0100.00716.70
7.2.60.0030.01017.04
7.2.00.0040.01119.47
7.1.200.0070.00815.76
7.1.100.0040.01118.32
7.1.70.0030.00716.85
7.1.60.0090.01619.82
7.1.50.0070.01716.80
7.1.00.0130.06722.45
7.0.200.0000.00816.39
7.0.140.0030.07321.95
7.0.100.0030.08020.00
7.0.90.0070.08319.93
7.0.80.0030.07719.92
7.0.70.0030.04720.02
7.0.60.0070.08719.93
7.0.50.0070.05020.24
7.0.40.0100.05720.23
7.0.30.0070.04719.96
7.0.20.0070.08020.16
7.0.10.0030.09020.09
7.0.00.0030.08020.14
5.6.280.0070.07021.11
5.6.250.0100.07320.79
5.6.240.0130.07320.70
5.6.230.0030.08320.73
5.6.220.0230.06320.74
5.6.210.0070.04720.70
5.6.200.0070.08021.05
5.6.190.0270.06720.96
5.6.180.0100.08021.02
5.6.170.0100.07720.93
5.6.160.0100.08021.07
5.6.150.0030.08321.05
5.6.140.0100.07321.08
5.6.130.0100.08020.96
5.6.120.0100.07320.95
5.6.110.0030.09021.08
5.6.100.0130.06321.00
5.6.90.0030.05721.00
5.6.80.0100.07320.44
5.6.70.0100.08020.34
5.6.60.0000.05020.48
5.6.50.0100.08720.50
5.6.40.0000.07020.40
5.6.30.0130.07720.43
5.6.20.0130.05320.37
5.6.10.0170.06720.39
5.6.00.0100.07720.34
5.5.380.0070.08020.56
5.5.370.0130.06720.36
5.5.360.0130.07020.40
5.5.350.0130.07720.46
5.5.340.0170.06020.92
5.5.330.0100.07720.91
5.5.320.0170.07320.66
5.5.310.0070.07720.92
5.5.300.0000.08020.90
5.5.290.0030.08320.93
5.5.280.0100.08320.80
5.5.270.0170.05720.88
5.5.260.0170.07720.86
5.5.250.0130.07720.74
5.5.240.0100.07720.31
5.5.230.0170.07320.27
5.5.220.0230.03020.31
5.5.210.0100.07720.13
5.5.200.0130.07020.13
5.5.190.0100.07320.15
5.5.180.0070.07320.25
5.5.160.0170.07320.17
5.5.150.0030.06320.11
5.5.140.0000.08320.28
5.5.130.0070.08020.10
5.5.120.0130.07020.22
5.5.110.0070.08020.18
5.5.100.0170.06720.09
5.5.90.0070.07719.92
5.5.80.0000.08020.08
5.5.70.0030.08320.16
5.5.60.0070.05320.07
5.5.50.0100.07020.15
5.5.40.0070.07020.17
5.5.30.0070.08320.14
5.5.20.0070.06020.16
5.5.10.0000.08020.14
5.5.00.0200.07020.00
5.4.450.0100.07319.18
5.4.440.0100.07719.46
5.4.430.0100.08019.46
5.4.420.0000.08319.45
5.4.410.0070.07019.34
5.4.400.0100.07318.86
5.4.390.0100.06719.21
5.4.380.0070.07018.87
5.4.370.0130.06319.14
5.4.360.0170.06719.24
5.4.350.0000.08018.90
5.4.340.0070.07719.21
5.4.320.0030.08019.09
5.4.310.0100.06318.88
5.4.300.0030.05318.96
5.4.290.0070.07018.88
5.4.280.0100.06719.03
5.4.270.0100.07319.23
5.4.260.0100.06719.04
5.4.250.0070.07719.13
5.4.240.0130.07018.85
5.4.230.0130.07019.04
5.4.220.0070.06719.13
5.4.210.0130.06718.89
5.4.200.0100.07018.88
5.4.190.0130.07319.20
5.4.180.0070.07319.14
5.4.170.0130.06719.09
5.4.160.0130.06718.83
5.4.150.0100.06719.14
5.4.140.0100.06016.54
5.4.130.0030.06016.24
5.4.120.0000.05716.24
5.4.110.0030.07716.48
5.4.100.0000.05016.48
5.4.90.0030.07016.45
5.4.80.0100.07016.38
5.4.70.0070.07016.52
5.4.60.0100.07016.58
5.4.50.0030.07316.25
5.4.40.0130.06716.52
5.4.30.0030.07316.31
5.4.20.0030.06716.40
5.4.10.0070.07016.30
5.4.00.0070.07715.89
5.3.290.0100.07014.68
5.3.280.0100.07014.56
5.3.270.0100.07014.71
5.3.260.0100.07314.75
5.3.250.0030.06014.68
5.3.240.0030.08014.68
5.3.230.0070.07314.54
5.3.220.0070.04014.52
5.3.210.0030.06014.51
5.3.200.0100.07014.58
5.3.190.0170.06314.57
5.3.180.0100.07314.51
5.3.170.0100.06714.69
5.3.160.0030.07714.63
5.3.150.0070.07314.71
5.3.140.0000.05714.63
5.3.130.0100.05314.62
5.3.120.0000.05014.54
5.3.110.0030.04014.70
5.3.100.0130.05314.19
5.3.90.0200.06014.09
5.3.80.0070.07013.95
5.3.70.0070.06314.05
5.3.60.0130.06313.93
5.3.50.0070.07313.89
5.3.40.0100.06714.03
5.3.30.0070.07713.84
5.3.20.0100.06313.73
5.3.10.0130.06313.66
5.3.00.0070.06313.63
5.2.170.0100.06011.26
5.2.160.0070.04311.18
5.2.150.0000.04011.04
5.2.140.0170.04711.17
5.2.130.0070.06311.02
5.2.120.0030.06311.23
5.2.110.0070.06011.11
5.2.100.0070.04711.03
5.2.90.0100.05711.20
5.2.80.0030.05711.20
5.2.70.0030.06311.23
5.2.60.0000.07010.97
5.2.50.0070.06011.05
5.2.40.0070.06011.10
5.2.30.0000.04311.11
5.2.20.0100.05711.04
5.2.10.0070.06010.79
5.2.00.0100.05010.86
5.1.60.0070.05010.05
5.1.50.0030.03010.05
5.1.40.0030.02310.07
5.1.30.0000.05310.47
5.1.20.0130.02310.35
5.1.10.0000.04010.15
5.1.00.0000.02710.20
5.0.50.0070.01710.05
5.0.40.0030.03710.05
5.0.30.0000.04310.05
5.0.20.0000.04010.05
5.0.10.0070.02010.05
5.0.00.0070.02710.05
4.4.90.0000.04010.05
4.4.80.0030.02710.05
4.4.70.0070.01710.05
4.4.60.0030.03710.05
4.4.50.0000.03710.05
4.4.40.0030.05310.05
4.4.30.0070.03010.05
4.4.20.0030.03010.05
4.4.10.0030.01310.05
4.4.00.0030.02310.05
4.3.110.0070.02010.05
4.3.100.0000.01710.05
4.3.90.0070.01010.05
4.3.80.0030.03010.05
4.3.70.0000.01710.05
4.3.60.0000.02010.05
4.3.50.0000.01310.05
4.3.40.0000.02310.05
4.3.30.0030.01310.05
4.3.20.0000.02310.05
4.3.10.0000.02010.05
4.3.00.0000.01710.05

preferences:
53.91 ms | 401 KiB | 5 Q