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'; public static $static = 'static'; public function privateMethod() { } } class B { private $private = 'private'; public $public = 'public'; } 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->getValue(); die(); //$p->setAccessible(true); //$p->setAccessible(false); try { $p->invoke(new A()); } catch (\ReflectionException $e) { var_dump($e->getCode()); } die(); $c = new B(); $p->setValue($c, 'b'); var_dump($p->getValue(new stdClass())); //$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.0100.01018.55
8.3.50.0070.00921.86
8.3.40.0070.00718.83
8.3.30.0060.00918.96
8.3.20.0040.00420.20
8.3.10.0080.00021.98
8.3.00.0040.00422.40
8.2.180.0000.01416.50
8.2.170.0120.00322.96
8.2.160.0100.00320.89
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00017.61
8.2.110.0030.00620.97
8.2.100.0000.01317.84
8.2.90.0000.00819.05
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0050.00318.04
8.2.50.0080.00018.10
8.2.40.0000.00918.22
8.2.30.0050.00517.94
8.2.20.0000.00717.61
8.2.10.0030.00617.65
8.2.00.0000.00817.62
8.1.280.0040.01125.92
8.1.270.0000.00823.97
8.1.260.0060.00326.35
8.1.250.0070.00728.09
8.1.240.0100.00022.62
8.1.230.0040.00717.52
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0030.00517.35
8.1.180.0080.00018.10
8.1.170.0000.00818.49
8.1.160.0050.00321.97
8.1.150.0000.00718.52
8.1.140.0070.00017.48
8.1.130.0030.00317.84
8.1.120.0000.00817.33
8.1.110.0040.00417.34
8.1.100.0030.00517.42
8.1.90.0000.00717.39
8.1.80.0040.00417.42
8.1.70.0070.00017.43
8.1.60.0060.00317.55
8.1.50.0090.00017.52
8.1.40.0000.01117.52
8.1.30.0030.00617.66
8.1.20.0000.00817.57
8.1.10.0030.00517.48
8.1.00.0000.00717.39
8.0.300.0040.00418.77
8.0.290.0090.00316.63
8.0.280.0030.00318.28
8.0.270.0000.00717.09
8.0.260.0050.00316.87
8.0.250.0000.00716.88
8.0.240.0070.00016.89
8.0.230.0030.00316.99
8.0.220.0000.00716.95
8.0.210.0000.00716.92
8.0.200.0030.00317.02
8.0.190.0060.00616.88
8.0.180.0070.00017.02
8.0.170.0000.00816.85
8.0.160.0090.00016.94
8.0.150.0030.00516.90
8.0.140.0030.00616.91
8.0.130.0000.00613.30
8.0.120.0000.00816.77
8.0.110.0040.00416.98
8.0.100.0080.00016.91
8.0.90.0040.00416.70
8.0.80.0110.00416.97
8.0.70.0080.00016.79
8.0.60.0000.00716.87
8.0.50.0000.00816.89
8.0.30.0090.01117.10
8.0.20.0140.00917.40
8.0.10.0000.00817.11
8.0.00.0070.01616.67
7.4.330.0050.00015.01
7.4.320.0000.00616.45
7.4.300.0060.00016.54
7.4.290.0030.00316.63
7.4.280.0030.00316.63
7.4.270.0070.00016.62
7.4.260.0030.00716.63
7.4.250.0080.00016.48
7.4.240.0040.00416.50
7.4.230.0030.00316.61
7.4.220.0170.00016.66
7.4.210.0090.00716.61
7.4.200.0050.00216.62
7.4.190.0040.00416.72
7.4.160.0040.01116.41
7.4.150.0090.00917.40
7.4.140.0100.00817.86
7.4.130.0060.01316.62
7.4.120.0100.00816.55
7.4.110.0110.00716.68
7.4.100.0070.01116.69
7.4.90.0150.00316.43
7.4.80.0000.01919.39
7.4.70.0120.00616.45
7.4.60.0110.01016.34
7.4.50.0030.00316.54
7.4.40.0060.01022.77
7.4.30.0100.00716.71
7.4.10.0090.00515.05
7.4.00.0050.00715.04
7.3.330.0000.00513.34
7.3.320.0050.00013.29
7.3.310.0000.00716.33
7.3.300.0030.00316.32
7.3.290.0070.01216.29
7.3.280.0090.00716.31
7.3.270.0060.01217.40
7.3.260.0160.00416.58
7.3.250.0110.00916.44
7.3.240.0070.01316.53
7.3.230.0150.00316.54
7.3.210.0060.01416.50
7.3.200.0070.01119.39
7.3.190.0150.00316.59
7.3.180.0160.00016.27
7.3.170.0100.00716.32
7.3.160.0060.00916.48
7.3.130.0110.00415.03
7.3.120.0020.01414.68
7.3.110.0060.01014.75
7.3.100.0030.01114.74
7.3.90.0030.01414.76
7.3.80.0050.00514.92
7.3.70.0030.01014.49
7.3.60.0040.00714.77
7.3.50.0030.00914.84
7.3.40.0030.00614.88
7.3.30.0080.00314.86
7.3.20.0130.00316.68
7.3.10.0000.01216.60
7.3.00.0030.00916.61
7.2.330.0080.00816.32
7.2.320.0090.00916.64
7.2.310.0130.00316.67
7.2.300.0040.01916.61
7.2.290.0040.01216.69
7.2.260.0070.01014.86
7.2.250.0100.00715.09
7.2.240.0070.00714.86
7.2.230.0070.01014.86
7.2.220.0000.01715.05
7.2.210.0040.01115.24
7.2.200.0000.01414.94
7.2.190.0070.00714.87
7.2.180.0030.00615.05
7.2.170.0000.01615.04
7.2.160.0110.00415.09
7.2.150.0100.00016.97
7.2.140.0090.00616.58
7.2.130.0000.01316.78
7.2.120.0060.00916.94
7.2.110.0000.01216.86
7.2.100.0120.00316.80
7.2.90.0000.01516.92
7.2.80.0050.00516.85
7.2.70.0090.00616.91
7.2.60.0050.01016.64
7.2.50.0080.00816.98
7.2.40.0060.00916.64
7.2.30.0070.01016.84
7.2.20.0070.00716.75
7.2.10.0070.00716.86
7.2.00.0130.00616.82
7.1.330.0100.00315.43
7.1.320.0000.00915.70
7.1.310.0040.01115.61
7.1.300.0060.00315.52
7.1.290.0110.00415.67
7.1.280.0080.00615.68
7.1.270.0080.00415.61
7.1.260.0130.00315.71
7.1.250.0070.00715.67
7.1.240.0040.00715.50
7.1.230.0030.01015.64
7.1.220.0030.01015.70
7.1.210.0110.00415.59
7.1.200.0060.00515.72
7.1.190.0030.00715.64
7.1.180.0030.00915.72
7.1.170.0040.00415.51
7.1.160.0070.00715.46
7.1.150.0120.00615.52
7.1.140.0070.00715.43
7.1.130.0120.00015.74
7.1.120.0030.01015.32
7.1.110.0080.01115.68
7.1.100.0090.00516.73
7.1.90.0060.00615.38
7.1.80.0070.00715.46
7.1.70.0090.00316.28
7.1.60.0070.01417.74
7.1.50.0080.00816.27
7.1.40.0060.00915.79
7.1.30.0090.00615.68
7.1.20.0030.01015.68
7.1.10.0040.00815.70
7.1.00.0020.04518.98
7.0.330.0060.00315.30
7.0.320.0040.00415.33
7.0.310.0070.00315.17
7.0.300.0000.01115.32
7.0.290.0070.01115.17
7.0.280.0080.00815.51
7.0.270.0060.00615.34
7.0.260.0080.00815.30
7.0.250.0030.01015.16
7.0.240.0040.01115.43
7.0.230.0060.00615.16
7.0.220.0040.01215.40
7.0.210.0040.00415.14
7.0.200.0060.00615.91
7.0.190.0040.01115.43
7.0.180.0000.00815.39
7.0.170.0060.00615.36
7.0.160.0040.01115.15
7.0.150.0000.00815.41
7.0.140.0050.04218.71
7.0.130.0040.01115.40
7.0.120.0030.00915.20
7.0.110.0070.00615.11
7.0.100.0100.00315.32
7.0.90.0030.00615.44
7.0.80.0060.00615.23
7.0.70.0030.05017.63
7.0.60.0070.04717.60
7.0.50.0070.02817.95
7.0.40.0080.03416.75
7.0.30.0070.04616.73
7.0.20.0080.04716.69
7.0.10.0090.04316.80
7.0.00.0070.04716.80
5.6.400.0060.00614.18
5.6.390.0070.00714.17
5.6.380.0060.00614.44
5.6.370.0000.01414.71
5.6.360.0030.01014.29
5.6.350.0090.00914.41
5.6.340.0030.00914.59
5.6.330.0060.00914.63
5.6.320.0000.01414.43
5.6.310.0000.01214.18
5.6.300.0060.00314.15
5.6.290.0030.01014.14
5.6.280.0020.04117.69
5.6.270.0090.00614.68
5.6.260.0110.00414.48
5.6.250.0120.00314.29
5.6.240.0060.00614.47
5.6.230.0030.01114.21
5.6.220.0030.05117.39
5.6.210.0050.04817.72
5.6.200.0030.03317.63
5.6.190.0080.04617.60
5.6.180.0080.04317.76
5.6.170.0050.03117.82
5.6.160.0050.03017.67
5.6.150.0070.04617.75
5.6.140.0050.04217.79
5.6.130.0120.04417.76
5.6.120.0050.03217.65
5.6.110.0040.04917.67
5.6.100.0100.04017.78
5.6.90.0050.04217.53
5.6.80.0100.02817.26
5.6.70.0050.03217.48
5.6.60.0130.03317.43
5.6.50.0030.03917.32
5.6.40.0080.04517.24
5.6.30.0110.03817.41
5.6.20.0100.04417.30
5.6.10.0080.04017.31
5.6.00.0100.04017.22
5.5.380.0000.01314.29
5.5.370.0060.00914.26
5.5.360.0130.03517.32
5.5.350.0020.03717.45
5.5.340.0020.04917.54
5.5.330.0100.04517.59
5.5.320.0050.04817.71
5.5.310.0030.03217.58
5.5.300.0080.04517.59
5.5.290.0020.04517.62
5.5.280.0100.03317.60
5.5.270.0070.03417.44
5.5.260.0080.03817.74
5.5.250.0100.03617.49
5.5.240.0080.02317.29
5.5.230.0050.04717.34
5.5.220.0080.03317.24
5.5.210.0090.03817.18
5.5.200.0080.02217.09
5.5.190.0070.04017.20
5.5.180.0030.03917.26
5.5.170.0030.00914.31
5.5.160.0070.04217.17
5.5.150.0030.03217.13
5.5.140.0100.04017.02
5.5.130.0050.04517.03
5.5.120.0080.03817.18
5.5.110.0070.04616.96
5.5.100.0030.03816.95
5.5.90.0110.03317.30
5.5.80.0060.04117.36
5.5.70.0080.04217.06
5.5.60.0020.04517.17
5.5.50.0030.04217.17
5.5.40.0050.04417.21
5.5.30.0100.02517.07
5.5.20.0130.03817.13
5.5.10.0050.04817.21
5.5.00.0050.02717.09
5.4.450.0070.04315.83
5.4.440.0120.03815.74
5.4.430.0040.04215.83
5.4.420.0090.04215.85
5.4.410.0040.03915.72
5.4.400.0040.03115.67
5.4.390.0070.02315.59
5.4.380.0070.03815.67
5.4.370.0110.03515.66
5.4.360.0020.02815.71
5.4.350.0050.04315.60
5.4.340.0050.04315.66
5.4.330.0030.00512.29
5.4.320.0050.03615.72
5.4.310.0020.04315.57
5.4.300.0100.03915.66
5.4.290.0000.04715.75
5.4.280.0050.04315.59
5.4.270.0080.03315.76
5.4.260.0050.03215.70
5.4.250.0070.02815.59
5.4.240.0030.04015.67
5.4.230.0090.03815.66
5.4.220.0060.03215.66
5.4.210.0020.04415.66
5.4.200.0130.02715.67
5.4.190.0100.03715.65
5.4.180.0060.03015.71
5.4.170.0030.03515.66
5.4.160.0070.03815.68
5.4.150.0080.03515.70
5.4.140.0020.03614.38
5.4.130.0050.03014.38
5.4.120.0070.02214.34
5.4.110.0080.03514.38
5.4.100.0020.02914.35
5.4.90.0030.04014.39
5.4.80.0060.03114.38
5.4.70.0050.03814.33
5.4.60.0070.04014.38
5.4.50.0050.04014.35
5.4.40.0090.03714.31
5.4.30.0100.02514.32
5.4.20.0070.03814.38
5.4.10.0050.02514.35
5.4.00.0030.02714.10
5.3.290.0030.04613.56
5.3.280.0000.03913.43
5.3.270.0070.03013.45
5.3.260.0090.04213.52
5.3.250.0070.03913.52
5.3.240.0020.04413.47
5.3.230.0050.02513.42
5.3.220.0080.04213.39
5.3.210.0070.04013.48
5.3.200.0060.02113.45
5.3.190.0010.02813.47
5.3.180.0110.03813.44
5.3.170.0050.04313.51
5.3.160.0080.04013.45
5.3.150.0060.03013.41
5.3.140.0020.04513.46
5.3.130.0070.03213.43
5.3.120.0030.04313.46
5.3.110.0060.03813.44
5.3.100.0090.01913.19
5.3.90.0120.04013.13
5.3.80.0060.02713.24
5.3.70.0040.02413.20
5.3.60.0050.04113.12
5.3.50.0080.03013.16
5.3.40.0080.02913.19
5.3.30.0030.03113.08
5.3.20.0070.04213.06
5.3.10.0020.03813.01
5.3.00.0030.04212.99
5.2.170.0100.06312.23
5.2.160.0130.05712.23
5.2.150.0070.03712.23
5.2.140.0170.05712.23
5.2.130.0100.03712.23
5.2.120.0100.04712.23
5.2.110.0100.06012.23
5.2.100.0030.03012.23
5.2.90.0130.06012.23
5.2.80.0030.04712.23
5.2.70.0170.05312.23
5.2.60.0100.04712.23
5.2.50.0100.03312.23
5.2.40.0000.06312.23
5.2.30.0000.04012.23
5.2.20.0030.05712.23
5.2.10.0030.05312.23
5.2.00.0070.06012.23
5.1.60.0030.05312.23
5.1.50.0000.04012.23
5.1.40.0030.04712.23
5.1.30.0070.05712.23
5.1.20.0070.06012.23
5.1.10.0070.04012.23
5.1.00.0100.04712.23
5.0.50.0030.04312.23
5.0.40.0030.04012.23
5.0.30.0030.06012.23
5.0.20.0070.04012.24
5.0.10.0030.03312.24
5.0.00.0030.04312.24
4.4.90.0030.03312.23
4.4.80.0030.02012.23
4.4.70.0030.03712.23
4.4.60.0000.03712.23
4.4.50.0100.03012.23
4.4.40.0000.05712.23
4.4.30.0030.03312.23
4.4.20.0000.03012.23
4.4.10.0000.03712.23
4.4.00.0030.05312.23
4.3.110.0030.02712.23
4.3.100.0070.03012.23
4.3.90.0000.03712.24
4.3.80.0070.04712.24
4.3.70.0030.03312.24
4.3.60.0030.03312.24
4.3.50.0000.04012.24
4.3.40.0000.05312.24
4.3.30.0070.03012.24
4.3.20.0000.02712.24
4.3.10.0030.03712.24
4.3.00.0000.03012.24

preferences:
44.41 ms | 401 KiB | 5 Q