3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar = 'baz'; } class Test { public static function getReader() { $reader = function & ($object, $property) { $value = & Closure::bind(function & () use ($property) { return $this->$property; }, $object, $object)->__invoke(); return $value; }; return $reader; } public function doStuff() { $reader = self::getReader(); $foo = new Foo(); $bar = & $reader($foo, 'bar'); $bar = 'tabb'; return $foo; } } $test = new Test(); $foo = $test->doStuff(); var_dump($foo);

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.00016.63
8.3.50.0180.00221.15
8.3.40.0110.00418.84
8.3.30.0140.00019.04
8.3.20.0040.00420.34
8.3.10.0070.00021.85
8.3.00.0090.00317.63
8.2.180.0090.00916.88
8.2.170.0170.00322.96
8.2.160.0070.00720.52
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0040.00419.36
8.2.110.0060.00621.07
8.2.100.0110.00017.75
8.2.90.0080.00019.29
8.2.80.0060.00317.97
8.2.70.0040.00417.50
8.2.60.0050.00317.80
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0070.00018.08
8.2.20.0040.00417.62
8.2.10.0070.00018.13
8.2.00.0030.00617.63
8.1.280.0110.00325.92
8.1.270.0120.00620.25
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00922.38
8.1.230.0030.00720.85
8.1.220.0040.00417.77
8.1.210.0100.00018.77
8.1.200.0090.00017.13
8.1.190.0050.00317.35
8.1.180.0000.00718.10
8.1.170.0050.00320.25
8.1.160.0070.00022.00
8.1.150.0040.00418.82
8.1.140.0070.00017.41
8.1.130.0080.00017.97
8.1.120.0040.00417.39
8.1.110.0030.00317.47
8.1.100.0040.00417.38
8.1.90.0000.00717.36
8.1.80.0030.00517.37
8.1.70.0000.00717.50
8.1.60.0040.00417.59
8.1.50.0040.00417.51
8.1.40.0050.00317.48
8.1.30.0050.00317.62
8.1.20.0030.00517.66
8.1.10.0030.00517.61
8.1.00.0060.00317.42
8.0.300.0060.00318.77
8.0.290.0050.00216.88
8.0.280.0000.00718.45
8.0.270.0000.00716.83
8.0.260.0000.00617.26
8.0.250.0000.00716.82
8.0.240.0060.00017.01
8.0.230.0030.00316.86
8.0.220.0000.00716.76
8.0.210.0070.00016.83
8.0.200.0000.00617.02
8.0.190.0000.00717.00
8.0.180.0040.00416.96
8.0.170.0060.00316.91
8.0.160.0050.00316.90
8.0.150.0080.00016.84
8.0.140.0000.00716.82
8.0.130.0030.00313.35
8.0.120.0060.00316.87
8.0.110.0020.00516.82
8.0.100.0000.00716.95
8.0.90.0080.00016.80
8.0.80.0130.00316.86
8.0.70.0080.00016.96
8.0.60.0020.00516.90
8.0.50.0000.00716.85
8.0.30.0080.01717.07
8.0.20.0090.01317.40
8.0.10.0070.00017.03
8.0.00.0070.01016.82
7.4.330.0080.00015.03
7.4.320.0030.00316.63
7.4.300.0060.00016.58
7.4.290.0080.00016.60
7.4.280.0070.00016.42
7.4.270.0000.00716.54
7.4.260.0000.00716.58
7.4.250.0000.00716.40
7.4.240.0050.00216.51
7.4.230.0000.00716.53
7.4.220.0120.00616.55
7.4.210.0100.00716.59
7.4.200.0000.00616.59
7.4.160.0090.00916.63
7.4.150.0170.00317.40
7.4.140.0050.01317.86
7.4.130.0150.00416.62
7.4.120.0080.00916.56
7.4.110.0100.00716.64
7.4.100.0150.00316.52
7.4.90.0070.01016.36
7.4.80.0090.00919.39
7.4.70.0100.00716.61
7.4.60.0140.00316.54
7.4.50.0040.00016.45
7.4.40.0060.01216.63
7.4.30.0070.01116.63
7.4.00.0100.00615.08
7.3.330.0030.00313.43
7.3.320.0100.00313.29
7.3.310.0030.00316.31
7.3.300.0000.00616.24
7.3.290.0040.00416.21
7.3.280.0100.00716.33
7.3.270.0070.01017.40
7.3.260.0140.00316.34
7.3.250.0130.00716.49
7.3.240.0140.00616.34
7.3.230.0180.00616.39
7.3.210.0170.00016.63
7.3.200.0090.00919.39
7.3.190.0060.00916.43
7.3.180.0090.01316.45
7.3.170.0090.00916.53
7.3.160.0070.01016.42
7.3.10.0050.00816.59
7.3.00.0050.00916.67
7.2.330.0100.00716.82
7.2.320.0140.00716.82
7.2.310.0060.01016.75
7.2.300.0100.00716.70
7.2.290.0070.01016.69
7.2.130.0070.00516.88
7.2.120.0080.00516.85
7.2.110.0030.00816.90
7.2.100.0050.00516.65
7.2.90.0120.00316.53
7.2.80.0050.00916.70
7.2.70.0060.00817.04
7.2.60.0090.00516.67
7.2.50.0090.00416.63
7.2.40.0050.00816.85
7.2.30.0050.00816.94
7.2.20.0030.00816.89
7.2.10.0030.01016.80
7.2.00.0090.00717.75
7.1.250.0040.00615.49
7.1.200.0090.00615.76
7.1.100.0040.00818.00
7.1.70.0080.00417.35
7.1.60.0060.01219.50
7.1.50.0080.01617.01
7.1.00.0100.07022.45
7.0.200.0340.00314.84
7.0.140.0070.06021.92
7.0.60.0070.03719.96
7.0.50.0030.04017.99
7.0.40.0100.06720.13
7.0.30.0270.05320.21
7.0.20.0230.08320.16
7.0.10.0070.05320.10
7.0.00.0070.04020.10
5.6.280.0070.07021.00
5.6.210.0130.08020.73
5.6.200.0170.04018.18
5.6.190.0030.05720.79
5.6.180.0370.07020.50
5.6.170.0170.04020.44
5.6.160.0000.04720.47
5.6.150.0070.08318.30
5.6.140.0070.05018.15
5.6.130.0070.05718.28
5.6.120.0130.07321.02
5.6.110.0130.08021.07
5.6.100.0070.08721.15
5.6.90.0100.04721.02
5.6.80.0130.06020.39
5.5.350.0200.07320.40
5.5.340.0130.04317.95
5.5.330.0030.04320.29
5.5.320.0100.08020.32
5.5.310.0330.05720.28
5.5.300.0130.08018.08
5.5.290.0100.07317.98
5.5.280.0070.08720.81
5.5.270.0100.03320.78
5.5.260.0100.08320.69
5.5.250.0070.06020.71
5.5.240.0230.06320.18
5.4.450.0070.07719.41
5.4.440.0070.03719.18
5.4.430.0000.08019.17
5.4.420.0000.04319.64
5.4.410.0170.03719.36
5.4.400.0230.02719.22
5.4.390.0000.08718.98
5.4.380.0030.04319.16
5.4.370.0030.06718.99
5.4.360.0030.05718.98
5.4.350.0030.07718.95
5.4.340.0030.05319.23
5.4.320.0030.04718.87
5.4.310.0030.07019.18
5.4.300.0000.04018.87
5.4.290.0030.04719.24
5.4.280.0000.04718.99
5.4.270.0030.06719.05
5.4.260.0030.07019.24
5.4.250.0130.05319.13
5.4.240.0100.03718.98
5.4.230.0030.03718.94
5.4.220.0000.07718.94
5.4.210.0000.04318.86
5.4.200.0100.07319.30
5.4.190.0070.04319.24
5.4.180.0030.04719.22
5.4.170.0070.07319.14
5.4.160.0000.07318.99
5.4.150.0070.05019.04
5.4.140.0030.04716.57
5.4.130.0070.06716.55
5.4.120.0200.03316.46
5.4.110.0000.06016.31
5.4.100.0030.06716.50
5.4.90.0030.07316.50
5.4.80.0000.04316.59
5.4.70.0000.05016.59
5.4.60.0070.03716.52
5.4.50.0000.05316.43
5.4.40.0070.07316.49
5.4.30.0070.07016.51
5.4.20.0030.05016.53
5.4.10.0030.07716.42
5.4.00.0070.03715.86
5.3.290.0030.04014.58
5.3.280.0000.07314.60
5.3.270.0000.08314.67
5.3.260.0030.04014.60
5.3.250.0000.07314.55
5.3.240.0000.05014.63
5.3.230.0030.07314.77
5.3.220.0000.05014.58
5.3.210.0000.05014.58
5.3.200.0030.07314.81
5.3.190.0030.07714.70
5.3.180.0030.05014.58
5.3.170.0030.04014.68
5.3.160.0030.07314.57
5.3.150.0000.08014.50
5.3.140.0000.08314.79
5.3.130.0000.07314.47
5.3.120.0030.07314.58
5.3.110.0030.07314.54
5.3.100.0000.07713.98
5.3.90.0000.04714.12
5.3.80.0030.07014.15
5.3.70.0030.04014.04
5.3.60.0030.06713.92
5.3.50.0030.07314.04
5.3.40.0000.06313.98
5.3.30.0030.06313.85
5.3.20.0070.06713.80
5.3.10.0070.07013.58
5.3.00.0000.06013.61
5.2.170.0130.03712.12
5.2.160.0070.06012.12
5.2.150.0000.05712.12
5.2.140.0000.04712.12
5.2.130.0070.06012.12
5.2.120.0070.05712.12
5.2.110.0000.06312.12
5.2.100.0030.06012.12
5.2.90.0030.05312.12
5.2.80.0100.03012.12
5.2.70.0070.05312.12
5.2.60.0070.04712.12
5.2.50.0000.05012.12
5.2.40.0070.04012.12
5.2.30.0030.03712.12
5.2.20.0030.05012.12
5.2.10.0000.05012.12
5.2.00.0030.04712.12
5.1.60.0070.02312.12
5.1.50.0030.04712.12
5.1.40.0000.03312.12
5.1.30.0030.05712.12
5.1.20.0030.05312.12
5.1.10.0070.05312.12
5.1.00.0000.03012.12
5.0.50.0030.01712.12
5.0.40.0000.02012.12
5.0.30.0000.03012.12
5.0.20.0000.02012.12
5.0.10.0070.01312.12
5.0.00.0000.03012.12
4.4.90.0070.02312.12
4.4.80.0070.03012.12
4.4.70.0030.03312.12
4.4.60.0030.02012.12
4.4.50.0100.01012.12
4.4.40.0000.02712.12
4.4.30.0030.01312.12
4.4.20.0100.02312.12
4.4.10.0030.02312.12
4.4.00.0000.02712.12
4.3.110.0000.01312.12
4.3.100.0000.01312.12
4.3.90.0000.01312.12
4.3.80.0000.02312.12
4.3.70.0000.01312.12
4.3.60.0030.01012.12
4.3.50.0000.01312.12
4.3.40.0000.02312.12
4.3.30.0000.01712.12
4.3.20.0030.01312.12
4.3.10.0030.01312.12
4.3.00.0030.01312.12

preferences:
44.35 ms | 401 KiB | 5 Q