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 function privateMethod() { } } class B { private $private = 'private'; public $public = 'public'; public static $static = 'static'; } 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('static'); $p->getValue(new stdClass()); 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.0140.00718.30
8.3.50.0050.01421.99
8.3.40.0120.00318.72
8.3.30.0140.00018.96
8.3.20.0040.00420.30
8.3.10.0040.01123.58
8.3.00.0040.00422.39
8.2.180.0120.00918.26
8.2.170.0110.00422.96
8.2.160.0030.01022.08
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00019.38
8.2.110.0040.01822.13
8.2.100.0000.01517.78
8.2.90.0040.00419.06
8.2.80.0040.00417.97
8.2.70.0040.00717.63
8.2.60.0080.00017.68
8.2.50.0030.00718.07
8.2.40.0030.00618.16
8.2.30.0030.00617.82
8.2.20.0000.00817.54
8.2.10.0080.00017.75
8.2.00.0040.00417.68
8.1.280.0070.00725.92
8.1.270.0000.01123.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.91
8.1.230.0090.00319.05
8.1.220.0090.00017.74
8.1.210.0050.00318.77
8.1.200.0090.00017.13
8.1.190.0000.00817.51
8.1.180.0030.00618.10
8.1.170.0090.00018.72
8.1.160.0040.00321.85
8.1.150.0000.01018.45
8.1.140.0040.00417.37
8.1.130.0030.00517.89
8.1.120.0040.00417.47
8.1.110.0050.00317.31
8.1.100.0040.00417.30
8.1.90.0000.00817.30
8.1.80.0000.00717.41
8.1.70.0080.00017.41
8.1.60.0040.00417.36
8.1.50.0060.00317.47
8.1.40.0000.00717.42
8.1.30.0060.00317.50
8.1.20.0040.00417.71
8.1.10.0030.00517.46
8.1.00.0060.00317.48
8.0.300.0060.00318.77
8.0.290.0040.00417.16
8.0.280.0040.00418.39
8.0.270.0000.00717.20
8.0.260.0070.00016.78
8.0.250.0030.00316.96
8.0.240.0060.00316.95
8.0.230.0000.00816.99
8.0.220.0030.00316.93
8.0.210.0050.00316.96
8.0.200.0030.00316.91
8.0.190.0030.00616.88
8.0.180.0050.00316.90
8.0.170.0000.00816.96
8.0.160.0040.00416.96
8.0.150.0050.00216.85
8.0.140.0030.00516.90
8.0.130.0040.00413.26
8.0.120.0000.00816.89
8.0.110.0040.00416.79
8.0.100.0000.00817.00
8.0.90.0050.00216.85
8.0.80.0120.00916.85
8.0.70.0050.00216.89
8.0.60.0040.00416.94
8.0.50.0000.00716.99
8.0.30.0080.01216.89
8.0.20.0110.00817.40
8.0.10.0000.00716.79
8.0.00.0100.00716.84
7.4.330.0000.00615.01
7.4.320.0000.00616.46
7.4.300.0000.00616.49
7.4.290.0000.00716.43
7.4.280.0050.00216.51
7.4.270.0000.00816.58
7.4.260.0030.00316.50
7.4.250.0030.00616.50
7.4.240.0050.00316.59
7.4.230.0030.00316.41
7.4.220.0150.00316.57
7.4.210.0080.01116.65
7.4.200.0070.00016.63
7.4.190.0040.00416.77
7.4.160.0030.01716.55
7.4.150.0130.01017.40
7.4.140.0100.00717.86
7.4.130.0090.00816.53
7.4.120.0080.01216.54
7.4.110.0070.01016.45
7.4.100.0090.00816.42
7.4.90.0190.00316.64
7.4.80.0130.01016.73
7.4.70.0030.01316.52
7.4.60.0060.01516.40
7.4.50.0030.00316.59
7.4.40.0130.00322.77
7.4.30.0110.00516.56
7.4.00.0100.00315.11
7.3.330.0050.00013.18
7.3.320.0050.00013.09
7.3.310.0050.00216.43
7.3.300.0030.00316.33
7.3.290.0090.00616.21
7.3.280.0140.00516.33
7.3.270.0040.01217.40
7.3.260.0160.01416.46
7.3.250.0130.00616.57
7.3.240.0060.01016.59
7.3.230.0070.01116.39
7.3.210.0100.00716.38
7.3.200.0100.01019.39
7.3.190.0150.00316.52
7.3.180.0060.01016.19
7.3.170.0060.00916.34
7.3.160.0060.00916.23
7.3.120.0100.00014.71
7.2.330.0150.00316.59
7.2.320.0110.01116.72
7.2.310.0040.01316.75
7.2.300.0140.00416.63
7.2.290.0030.01316.70
7.2.60.0030.01216.55
7.2.00.0060.00619.09
7.1.200.0030.00915.54
7.1.100.0080.00418.03
7.1.70.0080.00417.10
7.1.60.0070.01719.24
7.1.50.0060.01616.61
7.1.00.0070.07322.27
7.0.200.0080.00616.49
7.0.140.0130.06322.15
7.0.60.0000.07319.92
7.0.50.0030.08717.97
7.0.40.0130.08720.11
7.0.30.0100.05020.13
7.0.20.0270.07020.19
7.0.10.0100.08320.16
7.0.00.0030.09020.06
5.6.280.0070.07020.89
5.6.210.0070.08720.78
5.6.200.0100.08318.16
5.6.190.0130.08320.57
5.6.180.0300.06720.65
5.6.170.0100.04720.54
5.6.160.0200.03320.46
5.6.150.0030.06018.14
5.6.140.0200.06718.28
5.6.130.0030.07018.25
5.6.120.0130.07021.05
5.6.110.0170.07320.99
5.6.100.0100.06321.04
5.6.90.0070.06021.01
5.6.80.0100.07320.40
5.5.350.3430.03020.47
5.5.340.0170.07318.05
5.5.330.0070.07320.19
5.5.320.0300.08020.27
5.5.310.0270.06720.38
5.5.300.0130.06017.99
5.5.290.0130.07318.06
5.5.280.0130.07720.84
5.5.270.0000.05320.90
5.5.260.0070.06720.71
5.5.250.0070.04020.61
5.5.240.0070.07320.32
5.4.450.3300.03719.30
5.4.440.3270.04019.48
5.4.430.3330.04019.55
5.4.420.3470.02719.18
5.4.410.2930.03319.25
5.4.400.3770.03719.23
5.4.390.3600.04019.12
5.4.380.3870.04019.12
5.4.370.3900.03719.14
5.4.360.3970.04019.16
5.4.350.3700.03719.06
5.4.340.2930.03718.84
5.4.320.3470.03319.12
5.4.310.3130.04018.84
5.4.300.3200.02719.16
5.4.290.3170.04318.84
5.4.280.3130.02318.86
5.4.270.3300.03319.09
5.4.260.3400.03319.09
5.4.250.3930.04019.16
5.4.240.4030.02719.12
5.4.230.4070.03319.16
5.4.220.3630.04018.99
5.4.210.3500.03319.07
5.4.200.4070.04019.18
5.4.190.3230.02719.04
5.4.180.4170.02719.05
5.4.170.3870.03718.86
5.4.160.3730.04019.14
5.4.150.4000.04319.20
5.4.140.3170.03716.57
5.4.130.3070.03316.40
5.4.120.3000.04016.36
5.4.110.3330.03716.61
5.4.100.3170.03316.56
5.4.90.2830.04716.25
5.4.80.3100.03316.28
5.4.70.3470.03316.40
5.4.60.3330.03716.57
5.4.50.3000.04016.58
5.4.40.3500.04016.56
5.4.30.3570.03316.44
5.4.20.3170.03316.56
5.4.10.3300.03016.54
5.4.00.3330.03715.93
5.3.290.3500.04314.70
5.3.280.3330.04014.85
5.3.270.3370.03314.56
5.3.260.3070.04014.55
5.3.250.3270.04014.61
5.3.240.3170.03314.56
5.3.230.3100.03314.55
5.3.220.3470.03714.57
5.3.210.3100.03714.57
5.3.200.3330.03714.61
5.3.190.3100.04014.61
5.3.180.3400.04314.74
5.3.170.3300.04014.82
5.3.160.3430.03714.64
5.3.150.3400.03314.74
5.3.140.3470.03714.49
5.3.130.3370.03714.81
5.3.120.3530.03714.64
5.3.110.3200.04014.49
5.3.100.3300.03713.97
5.3.90.3430.03014.03
5.3.80.3330.03314.13
5.3.70.3300.04314.17
5.3.60.3230.04014.04
5.3.50.4100.03714.01
5.3.40.3270.03713.99
5.3.30.3330.03314.06
5.3.20.3630.03313.63
5.3.10.3030.03713.68
5.3.00.3830.04013.82
5.2.170.3270.03711.23
5.2.160.3330.03311.40
5.2.150.3230.02711.23
5.2.140.3100.03011.29
5.2.130.3130.02711.23
5.2.120.3400.02711.23
5.2.110.3330.02711.23
5.2.100.3030.02311.23
5.2.90.3300.03711.25
5.2.80.2670.03011.23
5.2.70.2400.02311.23
5.2.60.3000.02311.23
5.2.50.2800.03311.23
5.2.40.2430.02711.23
5.2.30.2170.03011.23
5.2.20.2330.03311.23
5.2.10.2330.03011.23
5.2.00.2130.03011.23
5.1.60.2300.02311.23
5.1.50.1970.03011.23
5.1.40.2370.02711.23
5.1.30.2330.02011.23
5.1.20.2400.02311.23
5.1.10.2670.02011.23
5.1.00.2370.02011.23
5.0.50.1100.01311.23
5.0.40.1300.02311.23
5.0.30.1030.03311.23
5.0.20.1300.02711.23
5.0.10.1330.02311.23
5.0.00.1070.03311.23
4.4.90.1030.01311.23
4.4.80.1200.01011.23
4.4.70.1070.01711.23
4.4.60.1000.01711.23
4.4.50.1170.01711.23
4.4.40.1270.02011.23
4.4.30.1270.02011.23
4.4.20.1130.02011.23
4.4.10.1330.01311.24
4.4.00.1100.03011.24
4.3.110.1100.01711.25
4.3.100.1130.01711.25
4.3.90.1030.01311.25
4.3.80.1130.02711.25
4.3.70.1230.01311.26
4.3.60.1270.02011.26
4.3.50.1270.02011.27
4.3.40.1030.02311.28
4.3.30.0700.02311.29
4.3.20.0670.02711.29
4.3.10.0600.02311.30
4.3.00.0530.01711.31

preferences:
45.39 ms | 401 KiB | 5 Q