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->getMethod('privateMethod'); $p->setAccessible(true); $p->setAccessible(false); var_dump($p->invoke(new stdClass())); $p = $r->getProperty('public'); $p->setAccessible(false); var_dump($p->getValue());

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.0000.01618.43
8.3.50.0100.00521.97
8.3.40.0040.01118.93
8.3.30.0100.00318.93
8.3.20.0000.00720.20
8.3.10.0080.00023.65
8.3.00.0050.00320.95
8.2.180.0070.00716.63
8.2.170.0110.00422.96
8.2.160.0100.00322.06
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0040.01126.16
8.2.120.0040.00420.83
8.2.110.0090.00022.08
8.2.100.0040.00817.78
8.2.90.0050.00319.09
8.2.80.0050.00317.97
8.2.70.0100.00017.63
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0000.00819.78
8.2.30.0000.00718.22
8.2.20.0060.00317.74
8.2.10.0000.00718.02
8.2.00.0030.00617.79
8.1.280.0070.01025.92
8.1.270.0060.00323.87
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.13
8.1.230.0070.00419.09
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0050.00318.41
8.1.160.0000.00721.99
8.1.150.0020.00518.57
8.1.140.0070.00017.42
8.1.130.0050.00317.86
8.1.120.0040.00417.50
8.1.110.0040.00417.46
8.1.100.0030.00417.43
8.1.90.0020.00517.47
8.1.80.0040.00417.45
8.1.70.0000.00817.39
8.1.60.0090.00017.38
8.1.50.0000.00817.46
8.1.40.0030.00617.52
8.1.30.0000.00917.75
8.1.20.0040.00417.73
8.1.10.0040.00417.63
8.1.00.0090.00017.44
8.0.300.0000.00818.77
8.0.290.0040.00417.02
8.0.280.0040.00418.42
8.0.270.0030.00317.23
8.0.260.0000.00617.17
8.0.250.0000.00717.00
8.0.240.0030.00317.04
8.0.230.0030.00316.95
8.0.220.0070.00016.86
8.0.210.0070.00016.83
8.0.200.0000.00716.98
8.0.190.0000.00817.01
8.0.180.0080.00016.93
8.0.170.0060.00316.94
8.0.160.0000.00716.89
8.0.150.0000.00716.87
8.0.140.0030.00416.78
8.0.130.0050.00013.38
8.0.120.0030.00616.96
8.0.110.0000.00716.85
8.0.100.0000.00816.88
8.0.90.0050.00317.02
8.0.80.0110.00516.85
8.0.70.0000.00716.82
8.0.60.0000.00716.97
8.0.50.0040.00416.75
8.0.30.0140.00617.19
8.0.20.0070.01317.40
8.0.10.0030.00516.96
8.0.00.0120.00716.92
7.4.330.0030.00315.00
7.4.320.0000.00616.66
7.4.300.0030.00316.54
7.4.290.0040.00416.69
7.4.280.0070.00016.43
7.4.270.0050.00316.56
7.4.260.0030.00616.70
7.4.250.0040.00416.36
7.4.240.0020.00516.67
7.4.230.0030.00316.74
7.4.220.0090.00916.66
7.4.210.0090.00616.52
7.4.200.0040.00416.44
7.4.160.0060.00916.42
7.4.150.0120.00617.40
7.4.140.0110.00617.86
7.4.130.0070.01016.55
7.4.120.0120.00916.49
7.4.110.0140.00316.69
7.4.100.0070.01016.66
7.4.90.0100.01016.57
7.4.80.0090.01319.39
7.4.70.0060.01416.51
7.4.60.0030.01416.45
7.4.50.0030.00616.56
7.4.40.0070.01116.40
7.4.30.0090.00616.48
7.4.00.0080.00614.71
7.3.330.0020.00213.32
7.3.320.0000.00713.20
7.3.310.0000.00716.21
7.3.300.0000.00716.36
7.3.290.0040.01216.33
7.3.280.0090.01016.32
7.3.270.0060.01017.40
7.3.260.0060.01216.52
7.3.250.0060.01116.41
7.3.240.0060.01116.41
7.3.230.0070.01116.57
7.3.210.0110.00716.57
7.3.200.0090.01219.39
7.3.190.0060.01616.50
7.3.180.0100.00616.27
7.3.170.0030.01316.48
7.3.160.0090.00616.52
7.3.120.0060.00614.72
7.2.330.0150.00416.55
7.2.320.0100.00716.75
7.2.310.0150.00316.68
7.2.300.0170.00016.73
7.2.290.0100.00716.58
7.2.60.0070.01016.87
7.2.00.0110.00419.12
7.1.200.0170.00015.21
7.1.100.0000.01118.03
7.1.70.0030.00517.09
7.1.60.0120.01219.70
7.1.50.0130.00716.89
7.1.00.0070.07322.51
7.0.200.0030.00616.64
7.0.140.0030.07321.99
7.0.80.0230.04020.01
7.0.70.0330.03319.92
7.0.60.0230.03719.96
7.0.50.0370.03020.27
7.0.40.0100.03320.15
7.0.30.0000.04720.15
7.0.20.0070.03720.05
7.0.10.0030.04719.99
7.0.00.0030.04320.02
5.6.280.0100.06721.13
5.6.230.0070.04020.66
5.6.220.0070.04020.59
5.6.210.0030.07720.60
5.6.200.0030.06320.97
5.6.190.0030.04721.10
5.6.180.0070.04020.96
5.6.170.0000.07321.07
5.6.160.0130.07721.20
5.6.150.0100.04321.14
5.6.140.0000.04721.09
5.6.130.0100.03720.96
5.6.120.0000.08021.00
5.6.110.0000.04021.10
5.6.100.0100.07721.13
5.6.90.0200.07321.12
5.6.80.0100.07720.42
5.6.70.0070.08320.43
5.6.60.0030.05720.34
5.6.50.0030.08320.36
5.6.40.0070.05320.34
5.6.30.0130.07020.44
5.6.20.0070.08020.43
5.6.10.0100.07320.50
5.6.00.0170.07020.33
5.5.370.0070.04020.38
5.5.360.0100.03320.36
5.5.350.0070.04320.45
5.5.340.0030.04720.68
5.5.330.0100.05320.92
5.5.320.0070.04720.84
5.5.310.0070.03720.86
5.5.300.0030.03720.82
5.5.290.0070.06020.92
5.5.280.0070.04020.92
5.5.270.0100.08020.95
5.5.260.0070.07320.89
5.5.250.0170.07720.57
5.5.240.0170.07020.22
5.5.230.0130.06020.02
5.5.220.0100.04320.23
5.5.210.0100.06720.21
5.5.200.0130.06320.12
5.5.190.0070.07720.26
5.5.180.0170.07320.28
5.5.160.0070.05020.22
5.5.150.0100.06320.17
5.5.140.0130.07020.26
5.5.130.0070.08020.26
5.5.120.0130.06720.21
5.5.110.0100.05020.28
5.5.100.0100.05320.14
5.5.90.0130.07320.13
5.5.80.0070.08320.04
5.5.70.0130.07020.17
5.5.60.0070.08020.19
5.5.50.0070.07320.18
5.5.40.0030.08019.95
5.5.30.0030.07719.96
5.5.20.0070.05320.09
5.5.10.0030.08720.14
5.5.00.0100.07720.06
5.4.450.0030.04019.49
5.4.440.0000.04719.42
5.4.430.0100.07719.37
5.4.420.0030.06019.37
5.4.410.0130.07319.23
5.4.400.0030.06019.13
5.4.390.0200.06719.23
5.4.380.0130.06719.09
5.4.370.0170.06719.05
5.4.360.0070.05018.88
5.4.350.0100.06319.05
5.4.340.0100.08018.99
5.4.320.0170.05018.90
5.4.310.0100.07719.12
5.4.300.0200.05719.13
5.4.290.0100.07018.94
5.4.280.0070.06719.10
5.4.270.0070.07319.00
5.4.260.0070.05319.18
5.4.250.0000.06719.16
5.4.240.0000.08719.04
5.4.230.0100.04719.21
5.4.220.0030.06719.12
5.4.210.0100.06718.94
5.4.200.0100.08019.08
5.4.190.0070.05719.08
5.4.180.0100.06719.11
5.4.170.0100.07719.21
5.4.160.0070.07719.11
5.4.150.0130.07018.92
5.4.140.0170.06716.47
5.4.130.0070.03716.24
5.4.120.0030.07716.39
5.4.110.0070.07716.53
5.4.100.0030.07316.39
5.4.90.0100.07016.45
5.4.80.0070.07316.36
5.4.70.0030.07316.47
5.4.60.0100.06316.32
5.4.50.0170.03716.49
5.4.40.0100.03716.49
5.4.30.0030.04016.27
5.4.20.0070.07016.44
5.4.10.0130.07316.53
5.4.00.0030.06716.23
5.3.290.0130.07016.23
5.3.280.0130.06716.23
5.3.270.0100.07316.23
5.3.260.0100.07016.23
5.3.250.0130.06716.23
5.3.240.0230.05316.23
5.3.230.0100.07316.23
5.3.220.0170.06016.23
5.3.210.0070.08016.23
5.3.200.0100.07716.23
5.3.190.0070.04016.23
5.3.180.0130.06316.23
5.3.170.0100.06716.23
5.3.160.0130.07016.23
5.3.150.0100.07016.23
5.3.140.0100.03716.23
5.3.130.0000.07716.23
5.3.120.0100.06316.23
5.3.110.0170.07316.23
5.3.100.0000.05316.23
5.3.90.0000.04716.23
5.3.80.0100.07716.23
5.3.70.0030.07716.23
5.3.60.0030.08016.23
5.3.50.0070.06716.23
5.3.40.0030.08016.23
5.3.30.0130.06716.23
5.3.20.0100.06716.23
5.3.10.0100.06716.23
5.3.00.0070.07316.23
5.2.170.0100.05716.23
5.2.160.0030.06316.23
5.2.150.0070.06316.23
5.2.140.0030.06316.23
5.2.130.0030.06716.23
5.2.120.0170.04716.23
5.2.110.0070.06016.23
5.2.100.0030.06316.23
5.2.90.0070.05016.23
5.2.80.0000.04716.23
5.2.70.0030.03016.23
5.2.60.0000.03316.23
5.2.50.0070.04716.23
5.2.40.0070.06016.23
5.2.30.0070.04716.23
5.2.20.0030.05316.23
5.2.10.0070.06316.23
5.2.00.0100.05016.23
5.1.60.0030.05016.23
5.1.50.0030.05016.23
5.1.40.0100.04716.23
5.1.30.0030.04716.23
5.1.20.0070.05316.23
5.1.10.0070.05016.23
5.1.00.0100.04016.23
5.0.50.0170.03016.23
5.0.40.0030.04016.23
5.0.30.0030.05316.23
5.0.20.0070.02716.23
5.0.10.0070.04016.23
5.0.00.0130.05716.23
4.4.90.0030.01716.23
4.4.80.0000.04016.23
4.4.70.0070.03316.23
4.4.60.0030.03316.23
4.4.50.0030.03716.23
4.4.40.0000.05716.23
4.4.30.0000.02316.23
4.4.20.0030.03316.23
4.4.10.0000.03716.23
4.4.00.0000.05716.23
4.3.110.0000.03316.23
4.3.100.0030.03316.23
4.3.90.0000.03716.23
4.3.80.0030.04716.23
4.3.70.0000.02016.23
4.3.60.0000.03716.23
4.3.50.0000.03016.23
4.3.40.0100.02316.23
4.3.30.0000.03716.23
4.3.20.0000.03716.23
4.3.10.0000.03716.23
4.3.00.0030.02016.23

preferences:
42.25 ms | 401 KiB | 5 Q