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 ClassImpl extends AbstractClass { private $variableA; private $variableB; public function __construct() { parent::__construct(); } } $impl = new ClassImpl(); $impl->set('variableA', 'Hello World'); echo $impl->get('variableA');

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.0170.00318.43
8.3.60.0110.01118.30
8.3.50.0050.01021.08
8.3.40.0090.00618.81
8.3.30.0030.01019.08
8.3.20.0000.00820.38
8.3.10.0080.00021.93
8.3.00.0080.00020.71
8.2.180.0140.00718.17
8.2.170.0100.01022.96
8.2.160.0150.00319.24
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0150.00326.16
8.2.120.0000.00819.36
8.2.110.0050.00522.20
8.2.100.0120.00019.42
8.2.90.0050.00319.05
8.2.80.0000.00817.97
8.2.70.0000.00917.63
8.2.60.0030.00617.93
8.2.50.0030.00518.07
8.2.40.0050.00317.91
8.2.30.0000.00718.06
8.2.20.0000.00717.61
8.2.10.0070.00017.61
8.2.00.0000.00817.56
8.1.280.0100.01025.92
8.1.270.0080.00022.15
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00323.83
8.1.230.0110.00019.16
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0070.00317.22
8.1.190.0040.00417.40
8.1.180.0060.00318.75
8.1.170.0090.00018.44
8.1.160.0040.00422.05
8.1.150.0000.00818.49
8.1.140.0040.00417.30
8.1.130.0000.00717.75
8.1.120.0030.00317.32
8.1.110.0030.00617.34
8.1.100.0070.00017.42
8.1.90.0040.00417.30
8.1.80.0040.00417.44
8.1.70.0030.00317.45
8.1.60.0000.00717.48
8.1.50.0040.00417.47
8.1.40.0080.00017.48
8.1.30.0060.00317.59
8.1.20.0000.00817.72
8.1.10.0050.00217.49
8.1.00.0000.00817.43
8.0.300.0030.00318.77
8.0.290.0030.00617.17
8.0.280.0030.00318.37
8.0.270.0000.00717.18
8.0.260.0030.00316.83
8.0.250.0080.00016.88
8.0.240.0000.00716.93
8.0.230.0000.00716.81
8.0.220.0000.00616.85
8.0.210.0030.00316.88
8.0.200.0030.00316.78
8.0.190.0040.00416.80
8.0.180.0000.00716.84
8.0.170.0040.00416.78
8.0.160.0040.00416.89
8.0.150.0040.00416.91
8.0.140.0040.00416.79
8.0.130.0000.00513.29
8.0.120.0050.00316.79
8.0.110.0000.00816.87
8.0.100.0040.00416.71
8.0.90.0040.00416.88
8.0.80.0040.01116.76
8.0.70.0080.00016.73
8.0.60.0000.00816.92
8.0.50.0000.00716.79
8.0.30.0120.00716.90
8.0.20.0150.00717.40
8.0.10.0030.00516.99
8.0.00.0110.00816.69
7.4.330.0000.00515.00
7.4.320.0030.00316.43
7.4.300.0060.00016.62
7.4.290.0030.00516.53
7.4.280.0000.00716.59
7.4.270.0000.00716.63
7.4.260.0070.00016.59
7.4.250.0050.00316.57
7.4.240.0000.00716.53
7.4.230.0030.00316.59
7.4.220.0070.01116.72
7.4.210.0060.00816.58
7.4.200.0000.00716.68
7.4.190.0030.00316.65
7.4.160.0150.00716.53
7.4.150.0070.01017.40
7.4.140.0090.00917.86
7.4.130.0070.01116.41
7.4.120.0130.00816.52
7.4.110.0100.00716.51
7.4.100.0110.00716.51
7.4.90.0070.01016.35
7.4.80.0060.01119.39
7.4.70.0110.00616.42
7.4.60.0070.01016.45
7.4.50.0040.00416.54
7.4.40.0130.00322.77
7.4.30.0060.00916.38
7.4.00.0000.01115.09
7.3.330.0050.00013.12
7.3.320.0050.00013.25
7.3.310.0030.00316.30
7.3.300.0020.00516.26
7.3.290.0120.00616.24
7.3.280.0080.00816.23
7.3.270.0110.00517.40
7.3.260.0000.01716.48
7.3.250.0140.00616.30
7.3.240.0090.01216.23
7.3.230.0100.01416.41
7.3.210.0120.00616.41
7.3.200.0100.00719.39
7.3.190.0130.01016.52
7.3.180.0100.00716.50
7.3.170.0100.01016.37
7.3.160.0090.00916.49
7.3.120.0050.00814.83
7.3.10.0100.00316.32
7.3.00.0140.00316.20
7.2.330.0030.01616.80
7.2.320.0070.01116.67
7.2.310.0110.00716.41
7.2.300.0060.01516.67
7.2.290.0080.01116.51
7.2.130.0060.00916.83
7.2.120.0120.00616.99
7.2.110.0070.00716.89
7.2.100.0150.00616.86
7.2.90.0120.00316.90
7.2.80.0000.01416.98
7.2.70.0030.01416.72
7.2.60.0030.01016.77
7.2.50.0060.01316.96
7.2.40.0060.00916.80
7.2.30.0070.00416.97
7.2.20.0060.00816.89
7.2.10.0060.00917.02
7.2.00.0030.00717.02
7.1.250.0090.00315.83
7.1.240.0060.00315.78
7.1.230.0070.01115.62
7.1.220.0060.00315.64
7.1.210.0060.00615.75
7.1.200.0110.00715.23
7.1.190.0180.00315.77
7.1.180.0040.01115.77
7.1.170.0030.00815.66
7.1.160.0000.01115.54
7.1.150.0040.00415.80
7.1.140.0110.00315.59
7.1.130.0110.00815.73
7.1.120.0060.00615.66
7.1.110.0060.00315.80
7.1.100.0070.00715.88
7.1.90.0100.01015.41
7.1.80.0070.01115.88
7.1.70.0090.00316.35
7.1.60.0100.01017.72
7.1.50.0140.00616.31
7.1.40.0040.00815.68
7.1.30.0030.00715.68
7.1.20.0030.01015.64
7.1.10.0140.00415.64
7.1.00.0040.04419.05
7.0.330.0000.01515.43
7.0.320.0000.01115.29
7.0.310.0060.00815.10
7.0.300.0060.00615.41
7.0.290.0000.01315.22
7.0.280.0030.01015.30
7.0.270.0000.01315.41
7.0.260.0110.00715.39
7.0.250.0000.01615.22
7.0.240.0100.00315.50
7.0.230.0060.00315.56
7.0.220.0070.00715.31
7.0.210.0070.00715.10
7.0.200.0020.00916.10
7.0.190.0030.00615.47
7.0.180.0030.00915.13
7.0.170.0090.00315.37
7.0.160.0150.00315.38
7.0.150.0070.00715.51
7.0.140.0060.03918.64
7.0.130.0070.01315.43
7.0.120.0070.00715.48
7.0.110.0030.01015.18
7.0.100.0000.01215.46
7.0.90.0070.00715.35
7.0.80.0000.01215.39
7.0.70.0070.01015.62
7.0.60.0090.03817.64
7.0.50.0050.02216.59
7.0.40.0060.02516.75
7.0.30.0200.04016.83
7.0.20.0170.04016.81
7.0.10.0200.02816.80
7.0.00.0060.02316.76
5.6.380.0080.00814.27
5.6.370.0080.00414.59
5.6.360.0030.00914.47
5.6.350.0000.01414.25
5.6.340.0030.00714.34
5.6.330.0040.01114.51
5.6.320.0070.00714.54
5.6.310.0120.00314.20
5.6.300.0070.00714.31
5.6.290.0070.00714.19
5.6.280.0050.04017.56
5.6.270.0030.01314.48
5.6.260.0030.01414.41
5.6.250.0000.01214.20
5.6.240.0060.00914.09
5.6.230.0040.00414.37
5.6.220.0040.00714.41
5.6.210.0050.04517.44
5.6.200.0110.04016.31
5.6.190.0100.03017.22
5.6.180.1670.02517.45
5.6.170.0130.02717.47
5.6.160.0030.03117.47
5.6.150.0090.02816.20
5.6.140.0070.04216.20
5.6.130.0070.02616.28
5.6.120.0100.02517.54
5.6.110.0050.05217.57
5.6.100.0070.04017.59
5.6.90.0160.03817.69
5.6.80.0080.04017.16
5.6.70.0120.04217.31
5.6.60.0070.00414.10
5.6.50.0040.01113.98
5.6.40.0040.00414.23
5.6.30.0070.00714.20
5.6.20.0140.00014.38
5.6.10.0040.00414.24
5.6.00.0040.00714.14
5.5.380.0030.00511.28
5.5.370.0040.00711.19
5.5.360.0090.00310.83
5.5.350.0070.04315.83
5.5.340.0100.03914.62
5.5.330.0000.05015.77
5.5.320.0200.02715.58
5.5.310.0170.04015.67
5.5.300.0050.04314.65
5.5.290.0100.03714.59
5.5.280.0050.02315.93
5.5.270.0030.04216.01
5.5.260.0050.04015.85
5.5.250.0020.04015.84
5.5.240.0040.02615.74
5.5.230.0030.00911.11
5.5.220.0030.00511.22
5.5.210.0060.00610.86
5.5.200.0080.00010.71
5.5.190.0000.00811.23
5.5.180.0000.00811.27
5.5.170.0000.00711.13
5.5.160.0000.01110.93
5.5.150.0000.01011.16
5.5.140.0030.00711.24
5.5.130.0060.00610.97
5.5.120.0030.00710.98
5.5.110.0030.00710.93
5.5.100.0060.00610.95
5.5.90.0040.00711.06
5.5.80.0030.00611.14
5.5.70.0000.00810.85
5.5.60.0060.00310.96
5.5.50.0070.00311.21
5.5.40.0000.01110.92
5.5.30.0090.00010.96
5.5.20.0070.00311.23
5.5.10.0050.00211.07
5.5.00.0030.00911.19
5.4.450.0170.03215.15
5.4.440.0400.03415.33
5.4.430.0420.02715.26
5.4.420.0050.03115.06
5.4.410.0320.04015.10
5.4.400.0170.03314.95
5.4.390.0230.02814.86
5.4.380.0130.03014.86
5.4.370.0130.03614.78
5.4.360.0050.03214.99
5.4.350.0110.02814.76
5.4.340.0080.02814.63
5.4.330.0060.00611.05
5.4.320.0040.02211.80
5.4.310.0050.02411.84
5.4.300.0070.02011.77
5.4.290.0020.02311.78
5.4.280.0090.01611.74
5.4.270.0040.02211.57
5.4.260.0030.02914.85
5.4.250.0070.03515.04
5.4.240.0030.03615.01
5.4.230.0050.02914.88
5.4.220.0060.03115.01
5.4.210.0080.02915.06
5.4.200.0090.02314.70
5.4.190.0020.03015.03
5.4.180.0080.02714.69
5.4.170.0040.03314.83
5.4.160.0080.02714.94
5.4.150.0100.03314.95
5.4.140.0070.03513.76
5.4.130.0090.03813.78
5.4.120.0030.03313.65
5.4.110.0030.03513.81
5.4.100.0140.02613.71
5.4.90.0060.03313.58
5.4.80.0060.02613.72
5.4.70.0150.03013.80
5.4.60.0030.02913.72
5.4.50.0050.02513.75
5.4.40.0030.03013.60
5.4.30.0100.02313.57
5.4.20.0030.03013.82
5.4.10.0070.02813.59
5.4.00.0030.03013.41
5.3.290.0090.02211.66
5.3.280.0050.02812.44
5.3.270.0120.03712.71
5.3.260.0060.02812.55
5.3.250.0080.02512.59
5.3.240.0060.03012.44
5.3.230.0120.02212.51
5.3.220.0080.03112.48
5.3.210.0060.03312.54
5.3.200.0130.02812.58
5.3.190.0100.03412.46
5.3.180.0120.03212.54
5.3.170.0050.03012.65
5.3.160.0050.03012.57
5.3.150.0080.03912.61
5.3.140.0140.02212.63
5.3.130.0050.03012.57
5.3.120.0000.03512.61
5.3.110.0070.02712.59
5.3.100.0070.02612.41
5.3.90.0030.04012.31
5.3.80.0020.03012.31
5.3.70.0050.02812.20
5.3.60.0070.02812.25
5.3.50.0090.02512.22
5.3.40.0000.03012.05
5.3.30.0030.03812.18
5.3.20.0050.02912.20
5.3.10.0060.02511.91
5.3.00.0070.02711.93
5.2.170.0000.02910.51
5.2.160.0050.02210.50
5.2.150.0030.02310.26
5.2.140.0030.02710.41
5.2.130.0070.01810.27
5.2.120.0050.02810.45
5.2.110.0050.02210.33
5.2.100.0080.01810.23
5.2.90.0050.02210.23
5.2.80.0070.02310.39
5.2.70.0050.02210.27
5.2.60.0010.02510.23
5.2.50.0070.02010.30
5.2.40.0030.02310.22
5.2.30.0060.03010.36
5.2.20.0030.02810.21
5.2.10.0060.02310.08
5.2.00.0090.0279.99
5.1.60.0040.0199.25
5.1.50.0030.0199.25
5.1.40.0050.0229.40
5.1.30.0100.0139.35
5.1.20.0030.0219.38
5.1.10.0000.0249.22
5.1.00.0080.0139.38
5.0.50.0080.0128.40
5.0.40.0030.0178.35
5.0.30.0040.0248.31
5.0.20.0050.0138.32
5.0.10.0070.0128.25
5.0.00.0030.0278.34
4.4.90.0050.0107.81
4.4.80.0000.0147.81
4.4.70.0020.0187.81
4.4.60.0050.0107.81
4.4.50.0070.0087.81
4.4.40.0020.0187.81
4.4.30.0060.0087.81
4.4.20.0020.0137.81
4.4.10.0030.0127.81
4.4.00.0000.0217.81
4.3.110.0000.0147.81
4.3.100.0000.0157.81
4.3.90.0050.0107.81
4.3.80.0000.0207.81
4.3.70.0030.0157.81
4.3.60.0020.0167.81
4.3.50.0020.0157.81
4.3.40.0050.0157.81
4.3.30.0000.0147.81
4.3.20.0000.0167.81
4.3.10.0000.0157.81
4.3.00.0020.0138.11

preferences:
52.28 ms | 401 KiB | 5 Q