3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Ex extends \ReflectionException { public $reflector; public function __construct($reflector, $message = '', \Exception $previous = null) { parent::__construct($message, 0, $previous); $this->reflector = $reflector; } } class A { private $private = 'private'; public $public = 'public'; private function privateMethod() { } } class B { //public $private = 'pr'; private $public = 'pu'; } class C extends \ReflectionClass { public function __construct($name) { try { parent::__construct($name); } catch (\Exception $e) { throw new Ex($this, $e->getMessage(), $e); } } } $r = new \ReflectionClass('A'); $p = $r->getProperty('private'); $p->setAccessible(true); //$p->setAccessible(false); $p->setValue(new stdClass(), 'b'); var_dump($p->getValue()); //$p = $r->getProperty('public'); //$p->setAccessible(false); //var_dump($p->getValue(true));

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.0120.00316.46
8.3.50.0070.01417.50
8.3.40.0170.00018.79
8.3.30.0110.00618.85
8.3.20.0040.00418.91
8.3.10.0040.00420.25
8.3.00.0030.00519.50
8.2.180.0110.00416.72
8.2.170.0070.01422.96
8.2.160.0130.00320.70
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0030.00620.63
8.2.110.0080.00319.22
8.2.100.0090.00317.72
8.2.90.0060.00319.75
8.2.80.0040.00419.34
8.2.70.0000.00917.63
8.2.60.0080.00017.55
8.2.50.0040.00418.07
8.2.40.0050.00318.03
8.2.30.0000.00818.04
8.2.20.0040.00419.51
8.2.10.0000.00817.62
8.2.00.0050.00317.72
8.1.280.0110.01125.92
8.1.270.0050.00323.99
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0050.00522.57
8.1.230.0090.00320.95
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0040.00417.22
8.1.190.0040.00417.53
8.1.180.0030.00618.10
8.1.170.0090.00018.76
8.1.160.0080.00018.78
8.1.150.0050.00318.43
8.1.140.0040.00417.35
8.1.130.0070.00017.78
8.1.120.0000.00817.30
8.1.110.0040.00417.43
8.1.100.0040.00417.39
8.1.90.0000.00717.36
8.1.80.0000.00817.39
8.1.70.0060.00017.27
8.1.60.0040.00417.41
8.1.50.0000.00817.35
8.1.40.0000.00817.55
8.1.30.0000.00917.66
8.1.20.0080.00017.52
8.1.10.0000.00917.64
8.1.00.0040.00417.39
8.0.300.0080.00019.90
8.0.290.0040.00416.75
8.0.280.0070.00018.36
8.0.270.0030.00317.21
8.0.260.0070.00016.83
8.0.250.0050.00316.96
8.0.240.0000.00716.96
8.0.230.0050.00216.85
8.0.220.0030.00316.86
8.0.210.0000.00716.94
8.0.200.0000.00716.93
8.0.190.0000.00717.02
8.0.180.0070.00016.82
8.0.170.0000.00816.80
8.0.160.0040.00416.93
8.0.150.0030.00716.84
8.0.140.0040.01016.87
8.0.130.0000.00613.38
8.0.120.0030.00516.86
8.0.110.0050.00316.96
8.0.100.0070.00016.92
8.0.90.0040.00416.68
8.0.80.0100.00616.79
8.0.70.0000.00816.80
8.0.60.0040.00416.76
8.0.50.0070.00016.80
8.0.30.0160.00317.02
8.0.20.0140.00817.10
8.0.10.0050.00317.00
8.0.00.0160.00816.68
7.4.330.0050.00012.95
7.4.320.0050.00216.59
7.4.300.0030.00316.54
7.4.290.0000.00716.46
7.4.280.0060.00316.45
7.4.270.0040.00416.46
7.4.260.0030.00313.24
7.4.250.0040.00416.39
7.4.240.0040.00416.50
7.4.230.0000.00716.29
7.4.220.0070.01316.44
7.4.210.0030.01216.57
7.4.200.0000.00716.42
7.4.190.0000.00716.63
7.4.160.0070.01316.45
7.4.150.0100.00716.29
7.4.140.0040.01516.34
7.4.130.0120.00616.39
7.4.120.0110.00716.29
7.4.110.0110.00716.41
7.4.100.0120.00916.63
7.4.90.0030.01316.55
7.4.80.0100.00819.39
7.4.70.0110.00716.62
7.4.60.0070.01016.43
7.4.50.0030.00616.27
7.4.40.0050.00816.44
7.4.30.0040.01216.49
7.4.00.0070.01114.80
7.3.330.0000.00613.18
7.3.320.0000.00513.21
7.3.310.0030.00516.15
7.3.300.0070.00016.14
7.3.290.0020.01516.25
7.3.280.0030.01116.23
7.3.270.0140.00316.48
7.3.260.0100.00716.25
7.3.250.0070.01016.38
7.3.240.0120.00916.21
7.3.230.0130.00316.39
7.3.210.0110.01116.57
7.3.200.0100.00616.20
7.3.190.0070.01516.48
7.3.180.0070.00716.18
7.3.170.0120.00916.25
7.3.160.0130.00316.32
7.3.120.0060.00814.81
7.3.110.0030.01514.58
7.3.100.0080.00714.70
7.3.90.0110.00214.71
7.3.80.0020.01014.63
7.3.70.0050.00714.78
7.3.60.0070.00514.78
7.3.50.0050.00814.64
7.3.40.0030.01014.80
7.3.30.0070.00614.62
7.3.20.0010.00816.57
7.3.10.0030.01016.39
7.3.00.0020.00916.41
7.2.330.0120.00916.33
7.2.320.0140.00316.21
7.2.310.0070.01016.65
7.2.300.0110.01216.23
7.2.290.0100.00716.62
7.2.250.0100.00614.80
7.2.240.0080.01014.97
7.2.230.0020.01415.02
7.2.220.0050.00514.84
7.2.210.0060.00614.91
7.2.200.0030.00915.09
7.2.190.0040.01315.05
7.2.180.0030.00914.90
7.2.170.0080.00714.94
7.2.00.0030.01319.32
7.1.330.0030.01015.57
7.1.320.0050.00415.73
7.1.310.0060.00615.55
7.1.300.0020.01015.45
7.1.290.0060.00615.53
7.1.280.0050.00715.66
7.1.270.0040.00715.59
7.1.260.0030.00915.72
7.1.100.0030.01018.20
7.1.70.0090.00316.88
7.1.60.0140.01019.30
7.1.50.0040.00716.91
7.1.00.0100.07022.43
7.0.200.0710.00714.88
7.0.140.0030.07322.00
7.0.120.0030.06722.18
7.0.60.0030.04020.09
7.0.50.0000.04717.93
7.0.40.0100.08320.21
7.0.30.0300.07720.26
7.0.20.0270.07320.13
7.0.10.0300.07320.09
7.0.00.0070.04020.12
5.6.280.0070.07020.94
5.6.210.0100.06720.51
5.6.200.0030.04018.29
5.6.190.0030.09320.77
5.6.180.0370.07020.43
5.6.170.0200.05720.55
5.6.160.0130.07020.55
5.6.150.0100.08318.22
5.6.140.0100.08018.17
5.6.130.0100.05018.14
5.6.120.0030.09021.05
5.6.110.0130.03721.07
5.6.100.0070.08320.99
5.6.90.0070.08321.11
5.6.80.0070.08020.54
5.6.70.0200.04320.40
5.5.350.0400.06720.43
5.5.340.0070.03717.99
5.5.330.0030.04020.25
5.5.320.0330.06720.47
5.5.310.0170.05020.34
5.5.300.0030.08318.04
5.5.290.0000.05318.03
5.5.280.0100.05320.91
5.5.270.0030.09320.79
5.5.260.0070.05020.68
5.5.250.0030.04020.60
5.5.240.0070.03320.16
5.4.450.0030.04319.30
5.4.440.0100.07719.18
5.4.430.0130.06719.18
5.4.420.0070.05719.19
5.4.410.0030.04719.11
5.4.400.0100.03318.98
5.4.390.0130.06719.24
5.4.380.0100.07319.14
5.4.370.0030.04019.24
5.4.360.0130.07019.14
5.4.350.0100.04719.15
5.4.340.0070.04719.25
5.4.320.0130.07319.12
5.4.310.0030.06019.00
5.4.300.0100.03319.14
5.4.290.0030.08019.16
5.4.280.0070.07319.20
5.4.270.0030.04318.89
5.4.260.0100.05319.00
5.4.250.0030.04019.23
5.4.240.0100.07719.17
5.4.230.0030.04319.07
5.4.220.0100.05319.23
5.4.210.0130.07018.91
5.4.200.0100.07019.14
5.4.190.0000.08319.20
5.4.180.0030.04019.19
5.4.170.0100.04719.23
5.4.160.0000.05719.23
5.4.150.0130.06319.22
5.4.140.0030.05316.43
5.4.130.0130.03716.36
5.4.120.0030.05016.51
5.4.110.0000.04716.43
5.4.100.0000.04016.70
5.4.90.0000.04316.46
5.4.80.0070.06016.43
5.4.70.0030.03716.50
5.4.60.0070.03316.53
5.4.50.0030.04016.32
5.4.40.0000.05016.57
5.4.30.0030.04016.43
5.4.20.0030.06016.28
5.4.10.0000.04016.44
5.4.00.0070.03715.96
5.3.290.0070.08014.86
5.3.280.0030.05714.78
5.3.270.0100.04314.68
5.3.260.0070.08014.66
5.3.250.0070.07014.68
5.3.240.0130.04014.69
5.3.230.0070.07714.66
5.3.220.0000.04714.64
5.3.210.0030.05014.60
5.3.200.0100.03014.60
5.3.190.0100.06014.64
5.3.180.0030.07014.63
5.3.170.0030.05314.64
5.3.160.0030.04314.50
5.3.150.0100.04014.62
5.3.140.0030.04314.59
5.3.130.0130.07014.49
5.3.120.0070.05314.54
5.3.110.0070.03714.46
5.3.100.0130.03314.13
5.3.90.0130.05313.93
5.3.80.0070.07713.93
5.3.70.0030.04314.10
5.3.60.0100.07313.97
5.3.50.0130.05714.13
5.3.40.0100.06713.97
5.3.30.0130.06713.95
5.3.20.0070.07313.79
5.3.10.0100.06713.68
5.3.00.0030.06313.66
5.2.170.0070.04311.06
5.2.160.0100.02311.17
5.2.150.0070.02711.14
5.2.140.0070.03011.23
5.2.130.0070.04311.09
5.2.120.0030.05311.29
5.2.110.0130.05311.13
5.2.100.0030.04711.13
5.2.90.0070.05711.18
5.2.80.0070.03011.18
5.2.70.0030.07011.13
5.2.60.0000.04711.22
5.2.50.0030.03011.09
5.2.40.0000.04311.01
5.2.30.0100.02310.95
5.2.20.0100.03311.04
5.2.10.0100.03710.94
5.2.00.0030.03010.80
5.1.60.0030.04010.18
5.1.50.0030.02710.00
5.1.40.0030.05010.06
5.1.30.0070.02310.38
5.1.20.0030.03010.43
5.1.10.0130.05010.01
5.1.00.0030.05710.00
5.0.50.0000.0238.59
5.0.40.0000.0278.41
5.0.30.0000.0708.27
5.0.20.0070.0238.27
5.0.10.0070.0238.18
5.0.00.0030.0308.09
4.4.90.0070.0178.02
4.4.80.0000.0238.02
4.4.70.0000.0208.02
4.4.60.0000.0208.02
4.4.50.0030.0138.02
4.4.40.0000.0578.02
4.4.30.0070.0208.02
4.4.20.0000.0208.02
4.4.10.0000.0238.02
4.4.00.0030.0578.02
4.3.110.0070.0108.02
4.3.100.0000.0338.02
4.3.90.0030.0138.02
4.3.80.0030.0538.02
4.3.70.0030.0308.02
4.3.60.0030.0378.02
4.3.50.0070.0338.02
4.3.40.0000.0278.02
4.3.30.0000.0208.02
4.3.20.0000.0238.02
4.3.10.0030.0338.02
4.3.00.0000.0178.02

preferences:
45.43 ms | 401 KiB | 5 Q