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 { 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->getMethod('privateMethod'); //$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($c)); //$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.0030.01316.75
8.3.50.0130.00717.37
8.3.40.0100.00718.68
8.3.30.0100.00318.70
8.3.20.0080.00018.63
8.3.10.0000.00818.63
8.3.00.0030.00519.25
8.2.180.0090.00618.59
8.2.170.0060.00922.96
8.2.160.0090.00618.83
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0030.00720.86
8.2.110.0060.00321.98
8.2.100.0040.00817.84
8.2.90.0050.00319.11
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0000.00817.90
8.2.50.0050.00319.46
8.2.40.0060.00320.46
8.2.30.0020.00519.23
8.2.20.0050.00517.66
8.2.10.0020.00517.61
8.2.00.0040.00417.70
8.1.280.0100.00725.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0080.00022.14
8.1.230.0080.00319.15
8.1.220.0030.00517.76
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0000.00917.23
8.1.180.0060.00318.10
8.1.170.0060.00318.64
8.1.160.0070.00019.03
8.1.150.0080.00018.88
8.1.140.0030.00617.40
8.1.130.0030.00317.71
8.1.120.0000.00717.37
8.1.110.0000.00717.44
8.1.100.0000.00717.44
8.1.90.0060.00317.36
8.1.80.0050.00217.43
8.1.70.0000.00717.38
8.1.60.0080.00017.60
8.1.50.0040.00417.38
8.1.40.0000.00917.55
8.1.30.0040.00417.68
8.1.20.0050.00217.62
8.1.10.0040.00417.60
8.1.00.0040.00417.37
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0030.00318.30
8.0.270.0080.00017.12
8.0.260.0040.00416.80
8.0.250.0020.00517.00
8.0.240.0000.00816.84
8.0.230.0000.00716.87
8.0.220.0050.00216.82
8.0.210.0000.00816.93
8.0.200.0030.00316.94
8.0.190.0030.00516.93
8.0.180.0000.00716.91
8.0.170.0040.00416.75
8.0.160.0080.00016.86
8.0.150.0040.00416.75
8.0.140.0060.00316.90
8.0.130.0050.00013.39
8.0.120.0030.00716.84
8.0.110.0040.00416.92
8.0.100.0070.00016.80
8.0.90.0080.00016.95
8.0.80.0000.01516.90
8.0.70.0080.00016.91
8.0.60.0040.00416.85
8.0.50.0000.00816.72
8.0.30.0060.01317.11
8.0.20.0110.00816.96
8.0.10.0070.00017.14
8.0.00.0040.01716.65
7.4.330.0060.00012.92
7.4.320.0040.00416.41
7.4.300.0000.00616.41
7.4.290.0030.00316.62
7.4.280.0040.00416.61
7.4.270.0030.00316.51
7.4.260.0050.00013.18
7.4.250.0040.00416.54
7.4.240.0000.00716.53
7.4.230.0070.00016.72
7.4.220.0060.00916.55
7.4.210.0070.00716.73
7.4.200.0030.00316.36
7.4.190.0030.00516.40
7.4.160.0030.01216.59
7.4.150.0070.01116.62
7.4.140.0100.00716.52
7.4.130.0100.00716.56
7.4.120.0100.00716.40
7.4.110.0140.00316.48
7.4.100.0060.01116.51
7.4.90.0090.00916.36
7.4.80.0080.01519.39
7.4.70.0140.00316.55
7.4.60.0080.00816.50
7.4.50.0060.00616.42
7.4.40.0060.01016.49
7.4.30.0120.01216.68
7.4.00.0090.00815.08
7.3.330.0000.00613.37
7.3.320.0030.00313.29
7.3.310.0070.00016.30
7.3.300.0030.00316.21
7.3.290.0100.00616.33
7.3.280.0090.00916.31
7.3.270.0100.00616.48
7.3.260.0180.00616.50
7.3.250.0110.00816.42
7.3.240.0070.01416.54
7.3.230.0110.00616.42
7.3.210.0100.01016.45
7.3.200.0070.01016.66
7.3.190.0100.00716.38
7.3.180.0120.00616.47
7.3.170.0060.01216.38
7.3.160.0080.00816.62
7.3.120.0090.00614.71
7.3.110.0060.01214.94
7.3.100.0040.01514.85
7.3.90.0070.01014.77
7.3.80.0100.00314.71
7.3.70.0090.00614.80
7.3.60.0100.00714.85
7.3.50.0030.01014.75
7.3.40.0100.00314.73
7.3.30.0040.00714.84
7.3.20.0050.00516.61
7.3.10.0090.00616.50
7.3.00.0040.01416.43
7.2.330.0090.01116.89
7.2.320.0130.00316.46
7.2.310.0110.01116.66
7.2.300.0110.01116.68
7.2.290.0090.01316.68
7.2.250.0100.01015.09
7.2.240.0040.01215.02
7.2.230.0030.01314.72
7.2.220.0060.00614.99
7.2.210.0030.01014.84
7.2.200.0090.00614.88
7.2.190.0140.00014.80
7.2.180.0040.00415.03
7.2.170.0030.01415.20
7.2.00.0040.01219.51
7.1.330.0000.01515.66
7.1.320.0030.00915.67
7.1.310.0000.01115.71
7.1.300.0040.00415.72
7.1.290.0000.01515.88
7.1.280.0060.00315.73
7.1.270.0030.01315.86
7.1.260.0000.01215.75
7.1.100.0080.00317.97
7.1.70.0000.00817.17
7.1.60.0180.00719.30
7.1.50.0210.00316.77
7.1.00.0030.06722.57
7.0.200.0120.00316.60
7.0.140.0030.07322.11
7.0.120.0100.02722.18
7.0.60.0100.07321.84
7.0.50.0130.08018.01
7.0.40.0100.07720.27
7.0.30.0430.06720.24
7.0.20.0270.08320.23
7.0.10.0030.05320.24
7.0.00.0070.08320.15
5.6.280.0130.06321.17
5.6.210.0030.08720.78
5.6.200.0030.04318.22
5.6.190.0030.04320.51
5.6.180.0270.07720.47
5.6.170.0370.05720.45
5.6.160.0100.08720.54
5.6.150.0000.04718.25
5.6.140.0100.08018.16
5.6.130.0100.06718.17
5.6.120.0100.08320.98
5.6.110.0070.07721.12
5.6.100.0100.07321.01
5.6.90.0070.05721.01
5.6.80.0030.08020.44
5.5.350.0200.05020.43
5.5.340.0130.06718.00
5.5.330.0070.08020.40
5.5.320.0200.08320.29
5.5.310.0230.08320.28
5.5.300.0100.06318.08
5.5.290.0100.05717.98
5.5.280.0070.06320.80
5.5.270.0070.08720.79
5.5.260.0100.07720.99
5.5.250.0030.09320.72
5.5.240.0270.06720.18
5.4.450.0000.05719.48
5.4.440.0000.08719.18
5.4.430.0130.04019.19
5.4.420.0130.07019.56
5.4.410.0070.07719.34
5.4.400.0130.06019.13
5.4.390.0100.04318.87
5.4.380.0070.06719.24
5.4.370.0000.05719.14
5.4.360.0030.06719.07
5.4.350.0000.05719.01
5.4.340.0030.04319.18
5.4.320.0030.05019.17
5.4.310.0070.03719.24
5.4.300.0030.04718.92
5.4.290.0100.07018.86
5.4.280.0070.08018.94
5.4.270.0070.06319.14
5.4.260.0070.04318.91
5.4.250.0070.07719.21
5.4.240.0100.03319.19
5.4.230.0100.07319.07
5.4.220.0070.07719.14
5.4.210.0070.07719.02
5.4.200.0070.08018.85
5.4.190.0170.07019.20
5.4.180.0130.03019.11
5.4.170.0130.05018.91
5.4.160.0100.07718.91
5.4.150.0100.06718.90
5.4.140.0030.07316.55
5.4.130.0070.03316.43
5.4.120.0070.07316.34
5.4.110.0170.06016.72
5.4.100.0100.03316.44
5.4.90.0070.05716.58
5.4.80.0100.04016.48
5.4.70.0100.04016.43
5.4.60.0000.06316.53
5.4.50.0070.07016.41
5.4.40.0070.03316.37
5.4.30.0030.04016.37
5.4.20.0130.05716.38
5.4.10.0030.04716.46
5.4.00.0130.04715.95
5.3.290.0030.04014.70
5.3.280.0070.04014.68
5.3.270.0130.07014.63
5.3.260.0070.08014.64
5.3.250.0100.07714.64
5.3.240.0030.03714.63
5.3.230.0030.04014.62
5.3.220.0100.07314.64
5.3.210.0030.05314.52
5.3.200.0130.06014.65
5.3.190.0130.06314.63
5.3.180.0030.07714.58
5.3.170.0070.06014.59
5.3.160.0070.03714.48
5.3.150.0030.07014.74
5.3.140.0100.03014.58
5.3.130.0100.04014.63
5.3.120.0030.06314.62
5.3.110.0100.07714.59
5.3.100.0030.04013.95
5.3.90.0130.05314.09
5.3.80.0100.05314.05
5.3.70.0130.05014.05
5.3.60.0100.03713.95
5.3.50.0170.03314.00
5.3.40.0100.07014.05
5.3.30.0070.07014.00
5.3.20.0030.04013.88
5.3.10.0030.06313.65
5.3.00.0000.04713.66
5.2.170.0100.05011.12
5.2.160.0000.06711.22
5.2.150.0070.05011.13
5.2.140.0030.06711.05
5.2.130.0030.03011.10
5.2.120.0000.06711.23
5.2.110.0030.05011.18
5.2.100.0070.04311.06
5.2.90.0100.05011.14
5.2.80.0030.06711.16
5.2.70.0030.06011.18
5.2.60.0030.06311.02
5.2.50.0030.03011.05
5.2.40.0070.02710.95
5.2.30.0100.05310.92
5.2.20.0130.05311.02
5.2.10.0030.05310.94
5.2.00.0130.05310.76
5.1.60.0070.04710.18
5.1.50.0070.02710.18
5.1.40.0100.0479.92
5.1.30.0070.05710.29
5.1.20.0030.03710.45
5.1.10.0030.05710.17
5.1.00.0000.05010.19
5.0.50.0100.0378.73
5.0.40.0030.0278.45
5.0.30.0030.0578.32
5.0.20.0030.0238.22
5.0.10.0030.0438.26
5.0.00.0030.0678.09
4.4.90.0000.0207.91
4.4.80.0000.0177.91
4.4.70.0000.0407.91
4.4.60.0070.0237.91
4.4.50.0070.0137.91
4.4.40.0000.0577.91
4.4.30.0030.0207.91
4.4.20.0000.0277.91
4.4.10.0000.0307.91
4.4.00.0030.0437.91
4.3.110.0000.0277.91
4.3.100.0000.0237.91
4.3.90.0000.0177.91
4.3.80.0030.0537.91
4.3.70.0030.0377.91
4.3.60.0000.0377.91
4.3.50.0000.0377.91
4.3.40.0070.0307.91
4.3.30.0030.0177.91
4.3.20.0000.0377.91
4.3.10.0030.0377.91
4.3.00.0000.0337.91

preferences:
48.06 ms | 400 KiB | 5 Q