3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar = 'baz'; } class Test { public 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 = $this->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.36
8.3.50.0090.01221.16
8.3.40.0120.00318.97
8.3.30.0120.00318.71
8.3.20.0000.00820.39
8.3.10.0080.00021.74
8.3.00.0070.00417.49
8.2.180.0150.00016.75
8.2.170.0070.00722.96
8.2.160.0040.01120.40
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00719.06
8.2.110.0180.00422.34
8.2.100.0120.00017.75
8.2.90.0040.00419.08
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0000.00717.93
8.2.50.0040.00418.07
8.2.40.0070.00018.09
8.2.30.0070.00017.99
8.2.20.0040.00417.78
8.2.10.0070.00018.01
8.2.00.0000.00717.67
8.1.280.0140.00025.92
8.1.270.0040.00418.87
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0030.00622.20
8.1.230.0030.00917.66
8.1.220.0000.00817.78
8.1.210.0060.00618.77
8.1.200.0070.00317.25
8.1.190.0090.00017.47
8.1.180.0000.00818.10
8.1.170.0050.00320.47
8.1.160.0040.00421.93
8.1.150.0040.00418.97
8.1.140.0040.00417.46
8.1.130.0040.00417.85
8.1.120.0000.00717.46
8.1.110.0000.00717.52
8.1.100.0000.00717.37
8.1.90.0030.00317.46
8.1.80.0000.00717.40
8.1.70.0000.00717.50
8.1.60.0040.00517.52
8.1.50.0090.00017.52
8.1.40.0050.00317.42
8.1.30.0000.00817.68
8.1.20.0000.00717.56
8.1.10.0000.00817.55
8.1.00.0060.00317.48
8.0.300.0000.00718.77
8.0.290.0030.00616.75
8.0.280.0000.00718.37
8.0.270.0000.00717.13
8.0.260.0030.00317.17
8.0.250.0000.00716.84
8.0.240.0080.00016.85
8.0.230.0040.00316.89
8.0.220.0030.00316.90
8.0.210.0030.00316.91
8.0.200.0000.00716.89
8.0.190.0040.00416.89
8.0.180.0080.00016.94
8.0.170.0040.00416.81
8.0.160.0030.00616.98
8.0.150.0000.01016.82
8.0.140.0000.00816.75
8.0.130.0070.00013.33
8.0.120.0050.00216.89
8.0.110.0000.00816.91
8.0.100.0040.00416.91
8.0.90.0040.00416.70
8.0.80.0120.00416.93
8.0.70.0050.00316.86
8.0.60.0000.00716.79
8.0.50.0020.00517.01
8.0.30.0100.01217.11
8.0.20.0080.01217.40
8.0.10.0040.00416.88
8.0.00.0100.01016.93
7.4.330.0070.00015.03
7.4.320.0000.00716.62
7.4.300.0000.00816.43
7.4.290.0040.00416.42
7.4.280.0060.00316.61
7.4.270.0040.00416.59
7.4.260.0000.00716.61
7.4.250.0060.00316.46
7.4.240.0040.00416.58
7.4.230.0000.00716.31
7.4.220.0060.01516.61
7.4.210.0060.00816.59
7.4.200.0000.00716.54
7.4.160.0140.00316.28
7.4.150.0090.00917.40
7.4.140.0080.01217.86
7.4.130.0050.01316.58
7.4.120.0090.00816.56
7.4.110.0060.01516.73
7.4.100.0120.00616.40
7.4.90.0130.00616.46
7.4.80.0080.00819.39
7.4.70.0100.00716.50
7.4.60.0060.00916.45
7.4.50.0000.00516.63
7.4.40.0090.01216.27
7.4.30.0080.00816.38
7.4.00.0050.01314.74
7.3.330.0070.00013.33
7.3.320.0120.00013.31
7.3.310.0070.00016.25
7.3.300.0070.00016.29
7.3.290.0000.00716.32
7.3.280.0040.01316.34
7.3.270.0240.02417.40
7.3.260.0060.01216.55
7.3.250.0120.00816.55
7.3.240.0110.00516.32
7.3.230.0160.00316.52
7.3.210.0030.01416.64
7.3.200.0030.01719.39
7.3.190.0090.00616.38
7.3.180.0130.00616.37
7.3.170.0130.01016.38
7.3.160.0130.00316.27
7.3.120.0130.00314.80
7.3.110.0030.01315.13
7.3.100.0090.00614.91
7.3.90.0060.00314.93
7.3.80.0080.00814.93
7.3.70.0030.00715.02
7.3.60.0040.00814.86
7.3.50.0030.01014.81
7.3.40.0030.01214.60
7.3.30.0030.00614.68
7.3.20.0110.00416.46
7.3.10.0000.01316.67
7.3.00.0040.01116.68
7.2.330.0100.00716.66
7.2.320.0120.00916.61
7.2.310.0140.00616.54
7.2.300.0060.01216.76
7.2.290.0150.00916.47
7.2.250.0000.01815.01
7.2.240.0030.01615.06
7.2.230.0080.00815.05
7.2.220.0090.00615.19
7.2.210.0000.01414.84
7.2.200.0050.01015.10
7.2.190.0040.01115.05
7.2.180.0060.00615.09
7.2.170.0100.00715.02
7.2.60.0070.01016.81
7.2.00.0000.00919.40
7.1.330.0070.00715.43
7.1.320.0060.00915.56
7.1.310.0090.00615.96
7.1.300.0000.01315.70
7.1.290.0000.01415.99
7.1.280.0070.00715.89
7.1.270.0060.00615.75
7.1.260.0040.00715.89
7.1.200.0070.00715.59
7.1.100.0060.00618.21
7.1.70.0000.00917.17
7.1.60.0060.00619.50
7.1.50.0150.01116.95
7.1.00.0000.08022.52
7.0.200.0040.01214.68
7.0.140.0030.05321.96
7.0.60.0100.07719.97
7.0.50.0000.05317.89
7.0.40.0130.06320.15
7.0.30.0330.05020.23
7.0.20.0300.07720.19
7.0.10.0000.06320.06
7.0.00.0030.05020.10
5.6.280.0070.07020.80
5.6.210.0030.04020.54
5.6.200.0070.05018.13
5.6.190.0000.04720.64
5.6.180.3370.04720.63
5.6.170.0270.08020.61
5.6.160.0070.05320.57
5.6.150.0030.04718.18
5.6.140.0100.07718.17
5.6.130.0070.06718.12
5.6.120.0070.08721.00
5.6.110.0070.06321.06
5.6.100.0100.08321.13
5.6.90.0130.03720.92
5.6.80.0000.06320.41
5.5.350.0000.04020.37
5.5.340.0030.05717.95
5.5.330.0100.03720.40
5.5.320.0300.04720.20
5.5.310.0330.05720.51
5.5.300.0070.04318.08
5.5.290.0000.04718.04
5.5.280.0070.06720.79
5.5.270.0130.07320.89
5.5.260.0070.07720.74
5.5.250.0130.07320.70
5.5.240.0200.07320.38
5.4.450.0400.05719.46
5.4.440.0730.05719.34
5.4.430.0970.06019.60
5.4.420.0770.05319.56
5.4.410.0130.06018.70
5.4.400.0300.05718.52
5.4.390.0330.06018.59
5.4.380.0400.05018.74
5.4.370.0370.05018.74
5.4.360.0370.06318.61
5.4.350.0300.06318.49
5.4.340.0300.06018.61
5.4.320.0300.05318.71
5.4.310.0300.06018.54
5.4.300.0370.05018.75
5.4.290.0330.05718.75
5.4.280.0330.06318.78
5.4.270.0370.04718.77
5.4.260.0370.05718.84
5.4.250.0330.05718.74
5.4.240.0300.06718.73
5.4.230.0300.06318.70
5.4.220.0300.06318.58
5.4.210.0300.05718.80
5.4.200.0370.04716.58
5.4.190.0330.05318.74
5.4.180.0230.06318.74
5.4.170.0430.05018.72
5.4.160.0430.06318.74
5.4.150.0470.04718.74
5.4.140.0470.04716.30
5.4.130.0270.05316.22
5.4.120.0300.05716.30
5.4.110.0270.05316.26
5.4.100.0230.06016.27
5.4.90.0370.06316.46
5.4.80.0300.04716.27
5.4.70.0400.04316.20
5.4.60.0330.04716.43
5.4.50.0200.05316.18
5.4.40.0230.06316.18
5.4.30.0300.04716.19
5.4.20.0500.06716.26
5.4.10.0630.06316.24
5.4.00.0370.05315.79
5.3.290.0270.06714.68
5.3.280.0330.06314.81
5.3.270.0230.06314.68
5.3.260.0170.07314.67
5.3.250.0330.07314.83
5.3.240.0370.05014.79
5.3.230.0330.05314.84
5.3.220.0270.06014.64
5.3.210.0300.06314.70
5.3.200.0530.06014.69
5.3.190.0330.05314.75
5.3.180.0370.05714.64
5.3.170.0300.06014.81
5.3.160.0300.06714.71
5.3.150.0470.06314.69
5.3.140.0530.05314.60
5.3.130.0500.06314.63
5.3.120.0370.06014.78
5.3.110.0370.05714.77
5.3.100.0430.05014.09
5.3.90.0330.05314.08
5.3.80.0400.05014.06
5.3.70.0300.06014.09
5.3.60.0400.05014.09
5.3.50.0500.04014.19
5.3.40.0500.06314.08
5.3.30.0330.07014.03
5.3.20.0430.04013.76
5.3.10.0370.04713.72
5.3.00.0300.05713.76
5.2.170.0300.04711.18
5.2.160.0370.04311.18
5.2.150.0230.05011.21
5.2.140.0230.05011.34
5.2.130.0300.04311.20
5.2.120.0300.04311.10
5.2.110.0400.03311.10
5.2.100.0370.05011.16
5.2.90.0800.05011.16
5.2.80.0330.04311.09
5.2.70.0230.05011.12
5.2.60.0430.04011.11
5.2.50.0370.04711.12
5.2.40.0270.04311.04
5.2.30.0200.05011.03
5.2.20.0270.04311.06
5.2.10.0200.04310.89
5.2.00.0300.04310.74
5.1.60.0300.03710.13
5.1.50.0170.04010.18
5.1.40.0130.0439.99
5.1.30.0270.03710.44
5.1.20.0370.03010.36
5.1.10.0270.04710.19
5.1.00.0370.04010.10
5.0.50.0270.0278.60
5.0.40.0100.0408.43
5.0.30.0230.0438.30
5.0.20.0130.0308.22
5.0.10.0200.0378.21
5.0.00.0170.0508.23
4.4.90.0130.0205.91
4.4.80.0130.0235.98
4.4.70.0100.0235.90
4.4.60.0170.0205.91
4.4.50.0170.0175.96
4.4.40.0070.0405.96
4.4.30.0130.0205.91
4.4.20.0070.0275.95
4.4.10.0070.0275.96
4.4.00.0070.0376.00
4.3.110.0070.0275.83
4.3.100.0130.0205.79
4.3.90.0130.0205.79
4.3.80.0030.0405.80
4.3.70.0100.0205.78
4.3.60.0200.0235.82
4.3.50.0130.0205.79
4.3.40.0030.0405.84
4.3.30.0070.0205.72
4.3.20.0030.0235.72
4.3.10.0070.0205.72
4.3.00.0100.0236.83

preferences:
54.23 ms | 401 KiB | 5 Q