3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class AbstractClass { 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; } } class MetadataClass extends AbstractClass { private $metadataA; private $metadataB; } class ActualClass extends MetadataClass { private $realField1; private $realField2; } $impl = new ClassImpl(); $impl->set('metadataA', 'Hello World'); echo $impl->get('metadataA');

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.0090.00918.31
8.3.50.0070.01220.96
8.3.40.0070.00718.82
8.3.30.0090.00619.22
8.3.20.0040.00420.20
8.3.10.0040.00422.14
8.3.00.0000.00720.67
8.2.180.0090.00916.63
8.2.170.0090.00622.96
8.2.160.0120.00318.72
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0060.00826.16
8.2.120.0000.00819.11
8.2.110.0060.00322.20
8.2.100.0070.00418.09
8.2.90.0040.00419.09
8.2.80.0060.00317.97
8.2.70.0030.00617.50
8.2.60.0030.00617.80
8.2.50.0040.00418.07
8.2.40.0050.00317.78
8.2.30.0050.00217.92
8.2.20.0000.00817.55
8.2.10.0070.00017.69
8.2.00.0030.00517.61
8.1.280.0170.00325.92
8.1.270.0000.00821.92
8.1.260.0080.00026.35
8.1.250.0000.00928.09
8.1.240.0090.00023.97
8.1.230.0090.00319.07
8.1.220.0000.00717.74
8.1.210.0000.00918.77
8.1.200.0000.00917.23
8.1.190.0000.00717.41
8.1.180.0050.00320.40
8.1.170.0090.00018.39
8.1.160.0070.00022.05
8.1.150.0040.00418.57
8.1.140.0070.00017.23
8.1.130.0000.00717.68
8.1.120.0080.00017.39
8.1.110.0100.00017.29
8.1.100.0000.00717.26
8.1.90.0020.00517.24
8.1.80.0040.00317.23
8.1.70.0000.00817.24
8.1.60.0040.00417.45
8.1.50.0080.00017.31
8.1.40.0030.00517.50
8.1.30.0040.00417.43
8.1.20.0080.00017.51
8.1.10.0000.00817.53
8.1.00.0050.00317.38
8.0.300.0040.00418.77
8.0.290.0040.00417.04
8.0.280.0070.00018.28
8.0.270.0070.00017.20
8.0.260.0000.00616.82
8.0.250.0000.00717.01
8.0.240.0040.00417.02
8.0.230.0040.00416.95
8.0.220.0030.00316.81
8.0.210.0030.00316.89
8.0.200.0000.00716.98
8.0.190.0040.00416.96
8.0.180.0030.00316.93
8.0.170.0040.00416.83
8.0.160.0000.00716.91
8.0.150.0000.00916.73
8.0.140.0040.00416.88
8.0.130.0050.00013.29
8.0.120.0070.00016.85
8.0.110.0040.00416.95
8.0.100.0000.00716.89
8.0.90.0000.00816.97
8.0.80.0090.01016.86
8.0.70.0050.00316.91
8.0.60.0000.00716.81
8.0.50.0040.00416.93
8.0.30.0140.00617.02
8.0.20.0100.00817.40
8.0.10.0050.00216.83
8.0.00.0100.01316.76
7.4.330.0030.00315.00
7.4.320.0030.00316.46
7.4.300.0040.00416.54
7.4.290.0000.00716.51
7.4.280.0050.00316.46
7.4.270.0030.00316.59
7.4.260.0070.00016.54
7.4.250.0040.00416.51
7.4.240.0000.00716.53
7.4.230.0000.00816.44
7.4.220.0090.01616.56
7.4.210.0040.01016.42
7.4.200.0000.00716.56
7.4.190.0070.00016.50
7.4.160.0060.01016.61
7.4.150.0070.01717.40
7.4.140.0090.00917.86
7.4.130.0100.00816.56
7.4.120.0120.00616.54
7.4.110.0070.01016.59
7.4.100.0100.01016.56
7.4.90.0030.01316.47
7.4.80.0070.01019.39
7.4.70.0160.00316.36
7.4.60.0140.00316.41
7.4.50.0040.00416.56
7.4.40.0070.00322.77
7.4.30.0150.00316.23
7.4.00.0100.00614.83
7.3.330.0050.00013.31
7.3.320.0030.00313.29
7.3.310.0000.00716.21
7.3.300.0030.00316.33
7.3.290.0060.00916.37
7.3.280.0070.00716.27
7.3.270.0140.00317.40
7.3.260.0080.00816.52
7.3.250.0100.00816.35
7.3.240.0070.01016.21
7.3.230.0060.01316.39
7.3.210.0110.00716.26
7.3.200.0090.01316.43
7.3.190.0060.00916.23
7.3.180.0030.01316.18
7.3.170.0090.00916.34
7.3.160.0080.00816.29
7.3.120.0080.01014.64
7.3.110.0100.00614.47
7.3.100.0000.01515.13
7.3.90.0070.01114.75
7.3.80.0000.01315.04
7.3.70.0040.01114.84
7.3.60.0100.00714.92
7.3.50.0060.00614.50
7.3.40.0000.00914.84
7.3.30.0090.00614.53
7.3.20.0060.00916.27
7.3.10.0090.00316.76
7.3.00.0000.01516.27
7.2.330.0060.01216.28
7.2.320.0150.00416.46
7.2.310.0110.01116.51
7.2.300.0060.00916.62
7.2.290.0030.01316.36
7.2.250.0000.01914.99
7.2.240.0100.01015.10
7.2.230.0060.01115.06
7.2.220.0070.00714.74
7.2.210.0040.00715.00
7.2.200.0040.01414.62
7.2.190.0070.01014.84
7.2.180.0000.01514.84
7.2.170.0060.00315.00
7.2.60.0060.01016.77
7.2.00.0030.01219.32
7.1.330.0060.00915.76
7.1.320.0080.00315.80
7.1.310.0000.01415.60
7.1.300.0090.00615.55
7.1.290.0060.01215.48
7.1.280.0100.00715.66
7.1.270.0070.00715.34
7.1.260.0000.01315.41
7.1.200.0070.00715.76
7.1.100.0110.00717.11
7.1.70.0000.01017.07
7.1.60.0070.01519.82
7.1.50.0070.01016.87
7.1.00.0030.06022.35
7.0.200.0000.00916.65
7.0.140.0030.07022.11
7.0.60.0130.07319.96
7.0.50.0100.07717.84
7.0.40.0130.05020.13
7.0.30.0200.04720.06
7.0.20.0330.08020.15
7.0.10.0200.04020.18
7.0.00.0070.08720.22
5.6.280.0000.07721.09
5.6.210.0230.06720.48
5.6.200.0070.04018.25
5.6.190.0100.04020.55
5.6.180.4130.04020.48
5.6.170.0270.04320.55
5.6.160.0100.06020.46
5.6.150.0070.04018.27
5.6.140.0030.04018.16
5.6.130.0030.07718.13
5.6.120.0070.08021.10
5.6.110.0100.08321.16
5.6.100.0170.07321.00
5.6.90.0030.08020.99
5.6.80.0030.04320.40
5.6.70.0270.07320.54
5.5.350.0000.08720.43
5.5.340.0070.07318.04
5.5.330.0130.07720.41
5.5.320.0230.08020.21
5.5.310.0300.07020.31
5.5.300.0000.04318.08
5.5.290.0070.04718.01
5.5.280.0070.04320.89
5.5.270.0030.04020.80
5.5.260.0070.07720.78
5.5.250.0070.04720.59
5.5.240.0100.05020.27
5.4.450.0330.06019.39
5.4.440.0730.04719.58
5.4.430.0870.05019.63
5.4.420.0770.05319.64
5.4.410.0200.05019.34
5.4.400.0330.04318.55
5.4.390.0370.05318.59
5.4.380.0370.05018.57
5.4.370.0130.05318.59
5.4.360.0030.06318.76
5.4.350.0230.04318.71
5.4.340.0130.05318.63
5.4.320.0050.03612.52
5.4.310.0040.04012.51
5.4.300.0040.03812.52
5.4.290.0040.04012.51
5.4.280.0110.04112.41
5.4.270.0100.04212.41
5.4.260.0100.04319.02
5.4.250.0070.06318.80
5.4.240.0130.04318.89
5.4.230.0130.04318.79
5.4.220.0030.05318.95
5.4.210.0130.05318.89
5.4.200.0070.04718.83
5.4.190.0000.05719.01
5.4.180.0030.05018.82
5.4.170.0130.04318.95
5.4.160.0130.06018.77
5.4.150.0070.05318.91
5.4.140.0070.05316.44
5.4.130.0070.04716.43
5.4.120.0000.05716.47
5.4.110.0000.05016.57
5.4.100.0030.04716.46
5.4.90.0000.05016.43
5.4.80.0100.06716.58
5.4.70.0030.04716.45
5.4.60.0130.06016.39
5.4.50.0030.05016.35
5.4.40.0000.05716.67
5.4.30.0030.06016.62
5.4.20.0100.04316.48
5.4.10.0030.06016.43
5.4.00.0030.06015.82
5.3.290.0060.03912.80
5.3.280.0130.05014.43
5.3.270.0000.05714.70
5.3.260.0230.05714.59
5.3.250.0070.05014.78
5.3.240.0030.05014.58
5.3.230.0130.04314.58
5.3.220.0130.04314.71
5.3.210.0070.07014.66
5.3.200.0000.06714.74
5.3.190.0130.05014.74
5.3.180.0070.05314.55
5.3.170.0030.07014.56
5.3.160.0100.06714.66
5.3.150.0100.04714.75
5.3.140.0000.06014.54
5.3.130.0100.04714.69
5.3.120.0070.07014.77
5.3.110.0070.05014.62
5.3.100.0130.05314.05
5.3.90.0130.05714.25
5.3.80.0070.04713.93
5.3.70.0070.05014.02
5.3.60.0000.05014.18
5.3.50.0000.05014.14
5.3.40.0000.05013.95
5.3.30.0030.06714.14
5.3.20.0000.05013.68
5.3.10.0070.04313.74
5.3.00.0170.06013.74
5.2.170.0000.04311.06
5.2.160.0030.03711.38
5.2.150.0070.03711.05
5.2.140.0000.04311.15
5.2.130.0000.04011.18
5.2.120.0030.03711.29
5.2.110.0070.03711.09
5.2.100.0070.04711.19
5.2.90.0030.04311.06
5.2.80.0000.04310.93
5.2.70.0030.04011.18
5.2.60.0070.05311.06
5.2.50.0030.04710.98
5.2.40.0000.05010.99
5.2.30.0100.03311.07
5.2.20.0070.03311.05
5.2.10.0030.04311.03
5.2.00.0030.03710.74
5.1.60.0030.04310.01
5.1.50.0070.0309.96
5.1.40.0000.0379.83
5.1.30.0070.03710.26
5.1.20.0030.03710.34
5.1.10.0070.0339.91
5.1.00.0030.03710.14
5.0.50.0030.0338.71
5.0.40.0030.0378.48
5.0.30.0070.0378.28
5.0.20.0000.0308.44
5.0.10.0030.0338.41
5.0.00.0100.0438.16
4.4.90.0000.0237.33
4.4.80.0000.0207.33
4.4.70.0000.0277.33
4.4.60.0030.0237.33
4.4.50.0070.0177.33
4.4.40.0030.0307.33
4.4.30.0000.0237.33
4.4.20.0000.0237.33
4.4.10.0000.0207.33
4.4.00.0000.0407.33
4.3.110.0030.0207.33
4.3.100.0030.0177.33
4.3.90.0000.0207.33
4.3.80.0000.0477.33
4.3.70.0000.0207.33
4.3.60.0000.0207.33
4.3.50.0030.0207.33
4.3.40.0030.0307.33
4.3.30.0000.0307.33
4.3.20.0030.0307.33
4.3.10.0030.0237.33
4.3.00.0070.0207.90

preferences:
44.73 ms | 401 KiB | 5 Q