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('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.0180.00416.38
8.3.50.0110.00822.12
8.3.40.0070.00718.84
8.3.30.0030.01019.09
8.3.20.0040.00420.18
8.3.10.0050.00323.48
8.3.00.0040.00422.51
8.2.180.0120.00616.75
8.2.170.0140.00722.96
8.2.160.0040.01218.77
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0110.00426.16
8.2.120.0000.00822.25
8.2.110.0060.00321.96
8.2.100.0090.00317.78
8.2.90.0040.00419.05
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0040.00417.80
8.2.50.0050.00518.07
8.2.40.0030.00718.03
8.2.30.0030.00517.91
8.2.20.0040.00417.72
8.2.10.0030.00619.53
8.2.00.0020.00517.68
8.1.280.0140.00025.92
8.1.270.0000.01523.97
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0050.00523.87
8.1.230.0110.00019.16
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.52
8.1.180.0060.00318.10
8.1.170.0000.01018.52
8.1.160.0000.00721.95
8.1.150.0040.00418.45
8.1.140.0000.00717.39
8.1.130.0000.00717.70
8.1.120.0000.00717.42
8.1.110.0060.00317.37
8.1.100.0000.00717.28
8.1.90.0000.01017.45
8.1.80.0040.00417.43
8.1.70.0070.00017.38
8.1.60.0090.00017.56
8.1.50.0000.00917.44
8.1.40.0090.00017.54
8.1.30.0040.00417.58
8.1.20.0020.00517.62
8.1.10.0040.00417.61
8.1.00.0000.00717.39
8.0.300.0070.00018.77
8.0.290.0050.00217.05
8.0.280.0040.00418.37
8.0.270.0060.00317.10
8.0.260.0060.00016.89
8.0.250.0060.00016.85
8.0.240.0080.00016.94
8.0.230.0000.00716.88
8.0.220.0030.00316.91
8.0.210.0030.00616.80
8.0.200.0030.00616.94
8.0.190.0050.00516.94
8.0.180.0040.00416.84
8.0.170.0000.00716.98
8.0.160.0000.00716.95
8.0.150.0050.00316.92
8.0.140.0070.00016.91
8.0.130.0000.00513.36
8.0.120.0080.00016.84
8.0.110.0040.00416.83
8.0.100.0040.00416.93
8.0.90.0040.00417.00
8.0.80.0100.00616.82
8.0.70.0030.00316.88
8.0.60.0040.00416.78
8.0.50.0000.00816.78
8.0.30.0200.00617.13
8.0.20.0110.00817.40
8.0.10.0000.00716.96
8.0.00.0100.00716.86
7.4.330.0050.00015.01
7.4.320.0030.00316.35
7.4.300.0000.00716.55
7.4.290.0030.00316.46
7.4.280.0030.00516.36
7.4.270.0050.00516.45
7.4.260.0000.00716.53
7.4.250.0020.00516.49
7.4.240.0030.00416.46
7.4.230.0040.00416.38
7.4.220.0070.01116.43
7.4.210.0080.00916.62
7.4.200.0000.00716.34
7.4.190.0050.00216.63
7.4.160.0060.01016.53
7.4.150.0050.01317.40
7.4.140.0120.00517.86
7.4.130.0070.01116.54
7.4.120.0080.01116.42
7.4.110.0100.00716.35
7.4.100.0100.00916.40
7.4.90.0090.00916.26
7.4.80.0140.00419.39
7.4.70.0150.00016.34
7.4.60.0120.00616.40
7.4.50.0000.00816.41
7.4.40.0090.00622.77
7.4.30.0080.00816.56
7.4.00.0100.00614.84
7.3.330.0000.00613.13
7.3.320.0050.00013.26
7.3.310.0080.00016.16
7.3.300.0070.00016.26
7.3.290.0070.01316.34
7.3.280.0110.00616.24
7.3.270.0160.00017.40
7.3.260.0150.00416.32
7.3.250.0090.01116.37
7.3.240.0070.01016.23
7.3.230.0140.00716.39
7.3.210.0100.00616.49
7.3.200.0150.00619.39
7.3.190.0120.01216.32
7.3.180.0080.00816.34
7.3.170.0100.00616.27
7.3.160.0110.00716.29
7.3.120.0090.00614.70
7.3.110.0040.01214.89
7.3.100.0150.00014.81
7.3.90.0070.00714.71
7.3.80.0080.00814.77
7.3.70.0080.00414.64
7.3.60.0060.00914.44
7.3.50.0060.00614.64
7.3.40.0000.01314.46
7.3.30.0030.01014.44
7.3.20.0070.01016.49
7.3.10.0000.01116.21
7.3.00.0000.01016.63
7.2.330.0120.00616.52
7.2.320.0140.00316.70
7.2.310.0100.00616.63
7.2.300.0070.01016.32
7.2.290.0070.01016.42
7.2.240.0070.00715.11
7.2.230.0030.00914.77
7.2.220.0030.01214.66
7.2.210.0070.00714.79
7.2.200.0090.00614.69
7.2.190.0070.00714.92
7.2.180.0000.01214.91
7.2.170.0070.00415.02
7.2.160.0030.01014.83
7.2.150.0000.01516.64
7.2.140.0040.00716.91
7.2.130.0070.00716.78
7.2.120.0000.01416.69
7.2.110.0060.00916.41
7.2.100.0030.01016.73
7.2.90.0080.00416.96
7.2.80.0030.01016.74
7.2.70.0030.01016.73
7.2.60.0040.01116.73
7.2.50.0000.01416.91
7.2.40.0090.00316.95
7.2.30.0000.01516.96
7.2.20.0120.00616.79
7.2.10.0030.01016.54
7.2.00.0030.01118.10
7.1.330.0040.00815.33
7.1.320.0040.00815.29
7.1.310.0030.01015.30
7.1.300.0070.00315.28
7.1.290.0040.00415.69
7.1.280.0090.00615.57
7.1.270.0060.00615.54
7.1.260.0030.00615.71
7.1.250.0070.00715.64
7.1.200.0130.00015.43
7.1.100.0060.01017.94
7.1.70.0000.00716.64
7.1.60.0000.02119.29
7.1.50.0090.01216.95
7.1.00.0070.07322.48
7.0.200.0000.00916.63
7.0.140.0030.07321.95
7.0.60.0030.04319.84
7.0.50.0030.05717.90
7.0.40.0100.03720.11
7.0.30.0270.04720.16
7.0.20.0230.07320.19
7.0.10.0100.03720.07
7.0.00.0070.07720.22
5.6.210.0130.07020.75
5.6.200.0270.03718.29
5.6.190.0130.07720.64
5.6.180.0470.07320.77
5.6.170.0270.07020.73
5.6.160.0000.04320.45
5.6.150.0030.05718.16
5.6.140.0030.04018.16
5.6.130.0030.06018.24
5.6.120.0130.06320.80
5.6.110.0130.04020.98
5.6.100.0100.08021.07
5.6.90.0070.06721.00
5.6.80.0130.08320.28
5.5.350.0200.08720.42
5.5.340.0000.04017.99
5.5.330.0170.07320.25
5.5.320.0270.05320.51
5.5.310.0270.05320.35
5.5.300.0100.07017.95
5.5.290.0100.06018.04
5.5.280.0030.09720.79
5.5.270.0100.08020.66
5.5.260.0100.08720.86
5.5.250.0070.08720.72
5.5.240.0070.07320.32
5.4.450.0230.07719.27
5.4.440.0230.03319.18
5.4.430.0230.03019.45
5.4.420.0130.06719.41
5.4.410.0170.08719.29
5.4.400.0170.03719.23
5.4.390.0170.04319.25
5.4.380.0130.03718.95
5.4.370.0200.03319.07
5.4.360.0100.04319.09
5.4.350.0130.03719.22
5.4.340.0170.03719.23
5.4.320.0170.03718.98
5.4.310.0170.03719.16
5.4.300.0170.04019.07
5.4.290.0100.04719.08
5.4.280.0170.04019.22
5.4.270.0170.04018.85
5.4.260.0200.06319.13
5.4.250.0200.03019.15
5.4.240.0170.04019.08
5.4.230.0200.03319.22
5.4.220.0100.04019.21
5.4.210.0130.03719.19
5.4.200.0130.04019.16
5.4.190.0230.05719.23
5.4.180.0230.07719.07
5.4.170.0170.05719.07
5.4.160.0230.07019.07
5.4.150.0300.07319.04
5.4.140.0200.06716.59
5.4.130.0170.04016.33
5.4.120.0170.05016.46
5.4.110.0170.06316.61
5.4.100.0330.05316.51
5.4.90.0200.07316.33
5.4.80.0330.05716.61
5.4.70.0170.07316.48
5.4.60.0170.06016.51
5.4.50.0200.07016.45
5.4.40.0200.04316.48
5.4.30.0200.03316.54
5.4.20.0300.05716.44
5.4.10.0130.05716.38
5.4.00.0200.05015.83
5.3.290.0170.04014.91
5.3.280.0130.03714.61
5.3.270.0230.06014.61
5.3.260.0300.04714.75
5.3.250.0230.07014.85
5.3.240.0230.03314.61
5.3.230.0130.04314.78
5.3.220.0200.05314.71
5.3.210.0230.06714.82
5.3.200.0230.04714.59
5.3.190.0270.05714.59
5.3.180.0200.05714.61
5.3.170.0270.04014.58
5.3.160.0370.05014.52
5.3.150.0330.06314.59
5.3.140.0270.06714.58
5.3.130.0200.07714.55
5.3.120.0170.06014.58
5.3.110.0230.05314.62
5.3.100.0200.07014.18
5.3.90.0200.05014.05
5.3.80.0170.04014.11
5.3.70.0270.02714.05
5.3.60.0230.05014.08
5.3.50.0200.05313.95
5.3.40.0170.04314.06
5.3.30.0230.06713.85
5.3.20.0230.06013.72
5.3.10.0300.06313.69
5.3.00.0230.07013.74
5.2.170.0130.04712.21
5.2.160.0170.05012.21
5.2.150.0170.05712.21
5.2.140.0200.03712.21
5.2.130.0200.04012.21
5.2.120.0170.05312.21
5.2.110.0200.05712.21
5.2.100.0200.03712.21
5.2.90.0200.05712.21
5.2.80.0130.06312.21
5.2.70.0200.06312.21
5.2.60.0100.05312.21
5.2.50.0230.04012.21
5.2.40.0200.05312.21
5.2.30.0200.05312.21
5.2.20.0170.04312.21
5.2.10.0200.04012.21
5.2.00.0230.04712.21
5.1.60.0170.05312.21
5.1.50.0170.04012.21
5.1.40.0170.02712.21
5.1.30.0170.05312.21
5.1.20.0200.05012.21
5.1.10.0200.03012.21
5.1.00.0100.05312.21
5.0.50.0130.04012.21
5.0.40.0070.02712.21
5.0.30.0100.06312.21
5.0.20.0070.03012.21
5.0.10.0100.04012.21
5.0.00.0100.05312.21
4.4.90.0100.03312.21
4.4.80.0100.03712.21
4.4.70.0070.02312.21
4.4.60.0100.02712.21
4.4.50.0030.04012.21
4.4.40.0170.04712.21
4.4.30.0070.02012.21
4.4.20.0070.03712.21
4.4.10.0100.02712.21
4.4.00.0100.04012.21
4.3.110.0100.03312.21
4.3.100.0100.03312.21
4.3.90.0130.01712.21
4.3.80.0100.02712.21
4.3.70.0100.01312.21
4.3.60.0130.02312.21
4.3.50.0070.01712.21
4.3.40.0100.03312.21
4.3.30.0000.04012.21
4.3.20.0070.03712.21
4.3.10.0100.03012.21
4.3.00.0070.03312.21

preferences:
39.67 ms | 401 KiB | 5 Q