3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class AbstractClass { private $basePropertyI; private $basePropertyII; public function __construct() { } public function get($property) { $rc = new \ReflectionClass($this); $p = $rc->getProperty($property); $p->setAccessible(true); return $p->getValue($this); } public function set($property, $value) { $rc = new \ReflectionClass($this); $p = $rc->getProperty($property); $p->setAccessible(true); $p->setValue($this, $value); return $this; } } abstract class MetadataClass extends AbstractClass { private $metadataA; private $metadataB; } class ActualClass extends MetadataClass { private $realField1; private $realField2; } $ac = new ActualClass(); $ac->set('realField1', 'Hello World!'); echo $ac->get('realField1'); $ac->set('basePropertyI', 'Hello Metadata!'); echo $ac->get('basePropertyI');

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.130.0030.00618.39
8.3.120.0000.00919.09
8.3.110.0050.00316.52
8.3.100.0070.00324.06
8.3.90.0040.00426.77
8.3.80.0000.01117.97
8.3.70.0170.00316.50
8.3.60.0090.00618.30
8.3.50.0120.00721.02
8.3.40.0080.00818.93
8.3.30.0110.00419.10
8.3.20.0080.00020.20
8.3.10.0080.00022.09
8.3.00.0070.00022.27
8.2.250.0040.00416.65
8.2.240.0080.00817.49
8.2.230.0060.00320.94
8.2.220.0060.00337.54
8.2.210.0060.00326.77
8.2.200.0060.00318.67
8.2.190.0060.01218.34
8.2.180.0130.00616.62
8.2.170.0140.00022.96
8.2.160.0040.01220.46
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0090.00926.16
8.2.120.0080.00019.38
8.2.110.0080.00320.91
8.2.100.0090.00319.76
8.2.90.0000.00919.21
8.2.80.0040.00417.97
8.2.70.0000.00917.46
8.2.60.0030.00617.80
8.2.50.0080.00018.07
8.2.40.0000.00819.95
8.2.30.0080.00018.14
8.2.20.0070.00017.81
8.2.10.0040.00417.75
8.2.00.0030.00717.59
8.1.300.0000.00916.56
8.1.290.0030.00630.84
8.1.280.0160.00625.92
8.1.270.0080.00022.01
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0150.00318.88
8.1.230.0040.00817.45
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0000.00917.35
8.1.190.0080.00017.41
8.1.180.0040.00418.61
8.1.170.0040.00418.46
8.1.160.0000.00722.13
8.1.150.0040.00418.61
8.1.140.0000.00717.34
8.1.130.0000.00717.90
8.1.120.0040.00417.48
8.1.110.0000.00817.42
8.1.100.0030.00317.38
8.1.90.0080.00017.33
8.1.80.0080.00017.39
8.1.70.0000.00717.41
8.1.60.0030.00617.59
8.1.50.0000.00717.54
8.1.40.0040.00417.45
8.1.30.0000.00817.59
8.1.20.0000.00817.73
8.1.10.0000.00717.50
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0000.00816.88
8.0.280.0070.00018.38
8.0.270.0000.00717.21
8.0.260.0000.00816.93
8.0.250.0030.00516.97
8.0.240.0040.00416.95
8.0.230.0040.00416.99
8.0.220.0030.00317.01
8.0.210.0000.00716.93
8.0.200.0040.00416.99
8.0.190.0000.00716.95
8.0.180.0050.00316.97
8.0.170.0000.00816.89
8.0.160.0000.00716.91
8.0.150.0040.00416.91
8.0.140.0040.00416.93
8.0.130.0030.00313.39
8.0.120.0000.00816.89
8.0.110.0050.00316.86
8.0.100.0040.00416.81
8.0.90.0040.00416.82
8.0.80.0040.01216.97
8.0.70.0000.00816.98
8.0.60.0000.00816.83
8.0.50.0080.00016.92
8.0.30.0090.00917.01
8.0.20.0100.00817.41
8.0.10.0020.00517.10
8.0.00.0110.00816.88
7.4.330.0030.00315.09
7.4.320.0000.00816.58
7.4.300.0040.00416.52
7.4.290.0000.00716.64
7.4.280.0040.00416.60
7.4.270.0030.00316.60
7.4.260.0070.00016.54
7.4.250.0070.00016.45
7.4.240.0070.00016.58
7.4.230.0040.00416.42
7.4.220.0160.00316.57
7.4.210.0070.00716.65
7.4.200.0040.00416.61
7.4.190.0070.00016.56
7.4.160.0100.00716.46
7.4.150.0120.00617.40
7.4.140.0070.01317.86
7.4.130.0110.00816.54
7.4.120.0090.01316.68
7.4.110.0150.00616.58
7.4.100.0120.00616.52
7.4.90.0100.01016.35
7.4.80.0170.00019.39
7.4.70.0110.00816.71
7.4.60.0100.00616.53
7.4.50.0030.00616.59
7.4.40.0090.00622.77
7.4.30.0160.00316.51
7.4.00.0060.01115.00
7.3.330.0000.00513.39
7.3.320.0050.00013.24
7.3.310.0030.00316.41
7.3.300.0000.00716.40
7.3.290.0040.01116.39
7.3.280.0100.00616.38
7.3.270.0100.00717.40
7.3.260.0130.00316.32
7.3.250.0080.01216.41
7.3.240.0120.00616.66
7.3.230.0130.00716.54
7.3.210.0060.01216.63
7.3.200.0000.01619.39
7.3.190.0030.01316.23
7.3.180.0130.00316.62
7.3.170.0090.01116.44
7.3.160.0060.00916.41
7.3.120.0060.00914.73
7.3.110.0090.00914.63
7.3.100.0110.00314.82
7.3.90.0000.00914.95
7.3.80.0030.01114.86
7.3.70.0090.00614.75
7.3.60.0120.00014.72
7.3.50.0000.00914.91
7.3.40.0030.01014.92
7.3.30.0030.00514.77
7.3.20.0030.00716.71
7.3.10.0090.00916.60
7.3.00.0110.00516.43
7.2.330.0100.01016.72
7.2.320.0110.00816.73
7.2.310.0110.00916.77
7.2.300.0140.00316.74
7.2.290.0090.00716.66
7.2.250.0100.01015.20
7.2.240.0100.00714.96
7.2.230.0000.01814.90
7.2.220.0090.00015.08
7.2.210.0030.01214.80
7.2.200.0070.00715.18
7.2.190.0030.01415.08
7.2.180.0030.00915.20
7.2.170.0030.01515.02
7.2.130.0140.00016.47
7.2.120.0130.00916.77
7.2.110.0110.00916.64
7.2.100.0080.00416.69
7.2.90.0120.00616.70
7.2.80.0070.01016.59
7.2.70.0070.01116.52
7.2.60.0090.00916.84
7.2.50.0080.00816.72
7.2.40.0100.00716.98
7.2.30.0030.00616.68
7.2.20.0030.00616.96
7.2.10.0040.00716.79
7.2.00.0020.01118.11
7.1.330.0000.01615.62
7.1.320.0070.00715.43
7.1.310.0060.00615.42
7.1.300.0030.00715.69
7.1.290.0030.01215.50
7.1.280.0030.00515.68
7.1.270.0030.01015.34
7.1.260.0000.01115.70
7.1.250.0130.00915.75
7.1.200.0060.00615.63
7.1.100.0000.01118.08
7.1.70.0030.00316.80
7.1.60.0140.01119.82
7.1.50.0030.01917.03
7.1.00.0070.06322.44
7.0.200.0030.00716.85
7.0.140.0030.07321.99
7.0.60.0130.07019.96
7.0.50.0100.04017.75
7.0.40.0070.07320.23
7.0.30.0270.06320.16
7.0.20.0400.07020.20
7.0.10.0230.04720.21
7.0.00.0130.08320.24
5.6.280.0100.06721.12
5.6.210.0170.07720.68
5.6.200.0030.08318.15
5.6.190.0070.04320.46
5.6.180.3730.04720.39
5.6.170.0270.06320.54
5.6.160.0000.05720.54
5.6.150.0000.06318.25
5.6.140.0030.03718.25
5.6.130.0070.07318.17
5.6.120.0070.08721.06
5.6.110.0030.09021.09
5.6.100.0030.05021.05
5.6.90.0100.06021.08
5.6.80.0030.04020.54
5.6.70.0170.06320.40
5.5.350.0130.07020.45
5.5.340.0070.04018.08
5.5.330.0070.07020.21
5.5.320.0230.08020.31
5.5.310.0330.07020.31
5.5.300.0000.04317.93
5.5.290.0070.04318.01
5.5.280.0170.07320.90
5.5.270.0030.04020.85
5.5.260.0030.08720.69
5.5.250.0170.07320.51
5.5.240.0070.06320.29
5.4.450.0170.05719.45
5.4.440.0230.05019.47
5.4.430.0530.06319.48
5.4.420.0700.05319.46
5.4.410.0700.05019.57
5.4.400.0300.05318.76
5.4.390.0200.06018.79
5.4.380.0300.05718.71
5.4.370.0230.04718.81
5.4.360.0070.05718.51
5.4.350.0130.05718.62
5.4.340.0170.05018.48
5.4.320.0060.03912.52
5.4.310.0040.04812.52
5.4.300.0050.04012.52
5.4.290.0090.04412.52
5.4.280.0050.03712.41
5.4.270.0040.03712.41
5.4.260.0100.07018.99
5.4.250.0100.06719.02
5.4.240.0000.08018.78
5.4.230.0130.05018.90
5.4.220.0070.06718.95
5.4.210.0130.06718.74
5.4.200.0130.04318.65
5.4.190.0030.05318.77
5.4.180.0070.04718.92
5.4.170.0170.05719.01
5.4.160.0030.05318.96
5.4.150.0100.04718.78
5.4.140.0070.05016.54
5.4.130.0070.05016.63
5.4.120.0030.05316.36
5.4.110.0070.04716.38
5.4.100.0030.04716.70
5.4.90.0000.05016.46
5.4.80.0100.05316.42
5.4.70.0130.05716.42
5.4.60.0070.06316.39
5.4.50.0070.04716.32
5.4.40.0100.06016.43
5.4.30.0000.06716.58
5.4.20.0130.04316.38
5.4.10.0030.05716.39
5.4.00.0030.05715.88
5.3.290.0040.04012.80
5.3.280.0100.05014.69
5.3.270.0070.05714.61
5.3.260.0030.05014.63
5.3.250.0030.05314.60
5.3.240.0070.04714.64
5.3.230.0070.06314.59
5.3.220.0070.06714.49
5.3.210.0070.05014.55
5.3.200.0170.03314.67
5.3.190.0000.07014.73
5.3.180.0070.06014.57
5.3.170.0000.05714.76
5.3.160.0100.07014.67
5.3.150.0000.07714.66
5.3.140.0030.05014.57
5.3.130.0030.05014.65
5.3.120.0000.05714.39
5.3.110.0000.06314.70
5.3.100.0000.05314.24
5.3.90.0030.06713.87
5.3.80.0100.06314.13
5.3.70.0100.04314.05
5.3.60.0030.05314.03
5.3.50.0130.04313.98
5.3.40.0070.04713.98
5.3.30.0070.04713.94
5.3.20.0000.05313.77
5.3.10.0000.05713.82
5.3.00.0070.06013.72
5.2.170.0000.05711.23
5.2.160.0000.04311.26
5.2.150.0070.04311.14
5.2.140.0030.06011.22
5.2.130.0070.05311.02
5.2.120.0030.04011.09
5.2.110.0070.04011.17
5.2.100.0030.05311.06
5.2.90.0070.04311.18
5.2.80.0030.04311.18
5.2.70.0000.04311.11
5.2.60.0030.04011.28
5.2.50.0070.05011.14
5.2.40.0030.04711.19
5.2.30.0100.04711.04
5.2.20.0030.03711.20
5.2.10.0000.04010.95
5.2.00.0070.03710.65
5.1.60.0000.04710.16
5.1.50.0030.03310.21
5.1.40.0070.03010.15
5.1.30.0030.03710.43
5.1.20.0030.03710.27
5.1.10.0070.03310.03
5.1.00.0030.03310.19
5.0.50.0000.0308.63
5.0.40.0070.0278.52
5.0.30.0000.0438.21
5.0.20.0030.0308.18
5.0.10.0030.0308.11
5.0.00.0070.0478.23
4.4.90.0000.0237.33
4.4.80.0030.0277.33
4.4.70.0000.0307.33
4.4.60.0030.0207.33
4.4.50.0000.0337.33
4.4.40.0070.0407.33
4.4.30.0030.0207.33
4.4.20.0030.0277.33
4.4.10.0030.0207.33
4.4.00.0070.0337.33
4.3.110.0000.0277.33
4.3.100.0030.0277.33
4.3.90.0000.0277.33
4.3.80.0000.0377.33
4.3.70.0030.0277.33
4.3.60.0070.0237.33
4.3.50.0070.0277.33
4.3.40.0000.0337.33
4.3.30.0070.0277.33
4.3.20.0000.0277.33
4.3.10.0070.0237.33
4.3.00.0130.0207.25

preferences:
29.11 ms | 403 KiB | 5 Q