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; } } abstract class MetadataClass extends AbstractClass { private $metadataA; private $metadataB; } class ActualClass extends MetadataClass { private $realField1; private $realField2; } $impl = new ActualClass(); $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.0110.01118.31
8.3.50.0080.01121.09
8.3.40.0070.00718.79
8.3.30.0070.00719.22
8.3.20.0000.00820.27
8.3.10.0040.00422.09
8.3.00.0050.00320.69
8.2.180.0040.01116.75
8.2.170.0110.00722.96
8.2.160.0060.01119.20
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0090.00626.16
8.2.120.0040.00419.36
8.2.110.0030.00622.07
8.2.100.0120.00017.91
8.2.90.0040.00419.14
8.2.80.0080.00018.04
8.2.70.0060.00317.48
8.2.60.0060.00618.04
8.2.50.0080.00018.07
8.2.40.0040.00418.16
8.2.30.0020.00517.95
8.2.20.0040.00417.66
8.2.10.0000.00717.76
8.2.00.0060.00317.79
8.1.280.0140.00725.92
8.1.270.0040.00422.14
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00423.84
8.1.230.0100.00019.02
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0050.00517.35
8.1.190.0000.00717.51
8.1.180.0040.00420.53
8.1.170.0040.00418.55
8.1.160.0040.00422.15
8.1.150.0000.00718.60
8.1.140.0000.00817.29
8.1.130.0070.00017.84
8.1.120.0000.00717.33
8.1.110.0060.00317.42
8.1.100.0070.00017.29
8.1.90.0030.00317.32
8.1.80.0000.00717.45
8.1.70.0030.00317.32
8.1.60.0000.00817.62
8.1.50.0060.00317.46
8.1.40.0070.00017.53
8.1.30.0080.00017.48
8.1.20.0000.00917.51
8.1.10.0040.00417.46
8.1.00.0000.00817.60
8.0.300.0050.00218.77
8.0.290.0040.00417.04
8.0.280.0040.00418.32
8.0.270.0070.00017.09
8.0.260.0030.00316.72
8.0.250.0030.00316.98
8.0.240.0030.00516.91
8.0.230.0000.00716.97
8.0.220.0000.00716.75
8.0.210.0000.00616.85
8.0.200.0000.00716.81
8.0.190.0070.00016.87
8.0.180.0040.00416.84
8.0.170.0060.00316.95
8.0.160.0060.00316.85
8.0.150.0050.00216.77
8.0.140.0040.00416.76
8.0.130.0050.00013.36
8.0.120.0000.00816.81
8.0.110.0050.00316.95
8.0.100.0030.00516.78
8.0.90.0000.00716.96
8.0.80.0070.01016.86
8.0.70.0080.00016.98
8.0.60.0070.00016.80
8.0.50.0040.00416.77
8.0.30.0060.01217.09
8.0.20.0100.00817.40
8.0.10.0040.00416.89
8.0.00.0080.01016.98
7.4.330.0020.00215.00
7.4.320.0070.00016.48
7.4.300.0060.00016.37
7.4.290.0000.00716.43
7.4.280.0050.00216.51
7.4.270.0060.00016.38
7.4.260.0000.00816.58
7.4.250.0040.00416.58
7.4.240.0020.00516.55
7.4.230.0040.00416.68
7.4.220.0110.01416.65
7.4.210.0110.00616.52
7.4.200.0030.00316.67
7.4.190.0000.00716.49
7.4.160.0110.00616.46
7.4.150.0130.00317.40
7.4.140.0100.00917.86
7.4.130.0030.01516.52
7.4.120.0090.00816.54
7.4.110.0090.00916.60
7.4.100.0120.01216.54
7.4.90.0100.00716.50
7.4.80.0170.00619.39
7.4.70.0030.01316.43
7.4.60.0160.00016.68
7.4.50.0000.00816.46
7.4.40.0130.00322.77
7.4.30.0070.01116.47
7.4.00.0090.00315.25
7.3.330.0030.00213.38
7.3.320.0000.00613.39
7.3.310.0000.00716.34
7.3.300.0000.00716.29
7.3.290.0070.00716.34
7.3.280.0110.00716.34
7.3.270.0030.01317.40
7.3.260.0090.01516.29
7.3.250.0130.00816.61
7.3.240.0120.00616.38
7.3.230.0060.01216.57
7.3.210.0050.01316.43
7.3.200.0140.00819.39
7.3.190.0130.01016.49
7.3.180.0090.00616.35
7.3.170.0070.01016.48
7.3.160.0090.00616.59
7.3.120.0030.01314.55
7.2.330.0080.01216.53
7.2.320.0060.01616.32
7.2.310.0080.00816.69
7.2.300.0060.01116.56
7.2.290.0120.00316.49
7.2.60.0070.00716.71
7.2.00.0030.01019.49
7.1.200.0030.00615.79
7.1.100.0180.00017.86
7.1.70.0070.00417.14
7.1.60.0070.01719.82
7.1.50.0060.01616.84
7.1.00.0030.06722.41
7.0.200.0040.00416.81
7.0.140.0030.07322.14
7.0.60.0070.08319.89
7.0.50.0070.07717.86
7.0.40.0130.08319.96
7.0.30.0330.06320.07
7.0.20.0300.06720.20
7.0.10.0230.06020.26
7.0.00.0030.08720.05
5.6.280.0030.07320.79
5.6.210.0030.08720.46
5.6.200.0070.07318.14
5.6.190.0100.07720.42
5.6.180.4130.04320.47
5.6.170.0270.08320.47
5.6.160.0130.08020.50
5.6.150.0130.07718.21
5.6.140.0070.03718.15
5.6.130.0100.08018.18
5.6.120.0130.08021.01
5.6.110.0130.07721.15
5.6.100.0170.07721.12
5.6.90.0030.07020.94
5.6.80.0200.06720.42
5.6.70.0170.08020.55
5.5.350.0170.07720.49
5.5.340.0070.05717.99
5.5.330.0070.07720.47
5.5.320.0300.06720.30
5.5.310.0270.06720.24
5.5.300.0070.06317.93
5.5.290.0070.06718.01
5.5.280.0000.05320.78
5.5.270.0030.06020.95
5.5.260.0070.07720.77
5.5.250.0170.05320.72
5.5.240.0030.03720.14
5.4.450.0630.06019.55
5.4.440.1100.06319.47
5.4.430.0630.06019.69
5.4.420.0630.05019.16
5.4.410.0500.06019.35
5.4.400.0470.05318.79
5.4.390.0300.05318.54
5.4.380.0200.06018.54
5.4.370.0200.04318.60
5.4.360.0130.05318.51
5.4.350.0130.05718.61
5.4.340.0030.06318.80
5.4.320.0050.04312.51
5.4.310.0050.04212.51
5.4.300.0100.03612.52
5.4.290.0090.03612.51
5.4.280.0040.03712.40
5.4.270.0080.03912.41
5.4.260.0000.05318.93
5.4.250.0070.05318.93
5.4.240.0000.07318.95
5.4.230.0000.06718.73
5.4.220.0100.05318.83
5.4.210.0070.05719.09
5.4.200.0100.05019.01
5.4.190.0070.05018.94
5.4.180.0070.04718.73
5.4.170.0070.07018.79
5.4.160.0030.05018.92
5.4.150.0070.05318.82
5.4.140.0070.05016.44
5.4.130.0030.04716.45
5.4.120.0030.04716.53
5.4.110.0070.05316.57
5.4.100.0070.05016.38
5.4.90.0070.04316.67
5.4.80.0030.05016.52
5.4.70.0000.05016.55
5.4.60.0100.04716.44
5.4.50.0100.04016.34
5.4.40.0070.04716.64
5.4.30.0030.05016.39
5.4.20.0100.04716.55
5.4.10.0000.05316.59
5.4.00.0100.04315.99
5.3.290.0080.04412.80
5.3.280.0070.05314.70
5.3.270.0070.05014.79
5.3.260.0030.05314.68
5.3.250.0100.04714.68
5.3.240.0100.04314.62
5.3.230.0030.05014.61
5.3.220.0070.04714.73
5.3.210.0070.04714.58
5.3.200.0070.04714.80
5.3.190.0000.06014.41
5.3.180.0000.06314.71
5.3.170.0100.06314.48
5.3.160.0000.05314.57
5.3.150.0000.07714.40
5.3.140.0070.04314.64
5.3.130.0030.05314.58
5.3.120.0030.05314.66
5.3.110.0030.05014.56
5.3.100.0000.06714.14
5.3.90.0030.05013.93
5.3.80.0100.04314.21
5.3.70.0070.04714.18
5.3.60.0070.06014.11
5.3.50.0030.06714.05
5.3.40.0030.06314.18
5.3.30.0030.07014.01
5.3.20.0100.04313.79
5.3.10.0030.04713.69
5.3.00.0070.04713.73
5.2.170.0070.04011.37
5.2.160.0030.05311.23
5.2.150.0030.04311.32
5.2.140.0070.05011.23
5.2.130.0030.04311.19
5.2.120.0030.03711.33
5.2.110.0100.04710.94
5.2.100.0030.04011.01
5.2.90.0000.04011.17
5.2.80.0000.06011.01
5.2.70.0030.04011.19
5.2.60.0070.04011.06
5.2.50.0030.04011.25
5.2.40.0000.04011.08
5.2.30.0070.04010.89
5.2.20.0100.04011.04
5.2.10.0030.05710.86
5.2.00.0070.04710.82
5.1.60.0100.03710.04
5.1.50.0100.03710.10
5.1.40.0000.0379.83
5.1.30.0030.03710.35
5.1.20.0030.03310.45
5.1.10.0030.03310.08
5.1.00.0070.04710.13
5.0.50.0000.0308.56
5.0.40.0030.0338.26
5.0.30.0000.0438.39
5.0.20.0070.0238.30
5.0.10.0000.0278.34
5.0.00.0030.0478.24
4.4.90.0100.0137.33
4.4.80.0000.0277.33
4.4.70.0000.0307.33
4.4.60.0000.0237.33
4.4.50.0030.0207.33
4.4.40.0070.0307.33
4.4.30.0000.0277.33
4.4.20.0030.0207.33
4.4.10.0000.0277.33
4.4.00.0000.0477.33
4.3.110.0070.0207.33
4.3.100.0000.0207.33
4.3.90.0000.0207.33
4.3.80.0070.0407.33
4.3.70.0030.0207.33
4.3.60.0000.0207.33
4.3.50.0000.0277.33
4.3.40.0000.0337.33
4.3.30.0030.0237.33
4.3.20.0000.0277.33
4.3.10.0070.0177.33
4.3.00.0070.0207.90

preferences:
63.55 ms | 400 KiB | 5 Q