3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Kitchen { private $yummy = 'cake'; } $reader = function & ($object, $property) { $value = & Closure::bind(function & () use ($property) { return $this->$property; }, $object, $object)->__invoke(); return $value; }; $kitchen = new Kitchen(); $cake = & $reader($kitchen, 'yummy'); $cake = 'sorry, I ate it!'; var_dump($kitchen);

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.130.0040.00416.46
8.3.120.0070.00318.89
8.3.110.0090.00020.94
8.3.100.0080.00416.79
8.3.90.0140.00726.77
8.3.80.0080.00418.55
8.3.70.0120.00316.58
8.3.60.0070.00718.40
8.3.50.0140.00522.03
8.3.40.0070.00718.97
8.3.30.0150.00320.13
8.3.20.0170.00318.77
8.3.10.0060.00320.96
8.3.00.0050.00319.68
8.2.250.0000.00816.97
8.2.240.0030.01617.20
8.2.230.0060.00622.58
8.2.220.0080.00037.54
8.2.210.0110.00426.77
8.2.200.0030.00616.63
8.2.190.0120.00318.41
8.2.180.0090.00616.38
8.2.170.0170.00022.96
8.2.160.0070.01020.39
8.2.150.0080.00025.66
8.2.140.0000.00724.66
8.2.130.0100.00026.16
8.2.120.0080.00019.82
8.2.110.0060.00320.52
8.2.100.0060.00617.72
8.2.90.0000.00817.60
8.2.80.0030.00517.97
8.2.70.0040.00418.05
8.2.60.0040.00417.75
8.2.50.0080.00017.63
8.2.40.0070.00318.02
8.2.30.0000.00818.12
8.2.20.0030.00617.74
8.2.10.0000.00817.70
8.2.00.0040.00417.75
8.1.300.0090.00017.89
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0040.00424.66
8.1.260.0100.00726.35
8.1.250.0140.00028.09
8.1.240.0060.00322.04
8.1.230.0000.01219.16
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0090.00017.35
8.1.190.0060.00317.23
8.1.180.0050.00518.10
8.1.170.0080.00018.66
8.1.160.0020.00518.83
8.1.150.0000.00718.73
8.1.140.0040.00417.45
8.1.130.0080.00017.73
8.1.120.0030.00417.37
8.1.110.0000.00717.36
8.1.100.0030.00517.41
8.1.90.0040.00417.43
8.1.80.0040.00417.43
8.1.70.0030.00317.39
8.1.60.0030.00617.64
8.1.50.0000.00717.51
8.1.40.0000.00817.43
8.1.30.0040.00417.48
8.1.20.0050.00317.55
8.1.10.0000.00817.54
8.1.00.0040.00417.46
8.0.300.0070.00019.73
8.0.290.0050.00516.63
8.0.280.0030.00718.45
8.0.270.0000.00716.72
8.0.260.0030.00316.73
8.0.250.0070.00016.93
8.0.240.0030.00616.82
8.0.230.0070.00016.95
8.0.220.0000.00816.93
8.0.210.0000.00816.90
8.0.200.0060.00016.86
8.0.190.0000.00916.90
8.0.180.0040.00416.79
8.0.170.0030.00516.77
8.0.160.0040.00416.88
8.0.150.0040.00416.94
8.0.140.0000.00816.82
8.0.130.0060.00013.33
8.0.120.0000.00816.87
8.0.110.0040.00416.91
8.0.100.0020.00516.95
8.0.90.0000.00816.91
8.0.80.0110.00716.84
8.0.70.0040.00416.68
8.0.60.0040.00416.80
8.0.50.0000.00716.68
8.0.30.0080.01317.24
8.0.20.0080.01017.40
8.0.10.0000.00716.99
8.0.00.0120.00816.67
7.4.330.0030.00316.88
7.4.320.0030.00316.51
7.4.300.0000.00616.61
7.4.290.0030.00316.58
7.4.280.0030.00316.50
7.4.270.0030.00316.53
7.4.260.0050.00013.18
7.4.250.0030.00616.37
7.4.240.0030.00316.55
7.4.230.0030.00316.41
7.4.220.0150.00416.64
7.4.210.0100.00716.58
7.4.200.0040.00416.36
7.4.190.0030.00316.50
7.4.160.0220.00916.54
7.4.150.0110.00717.40
7.4.140.0070.01017.86
7.4.130.0120.01016.45
7.4.120.0130.00616.43
7.4.110.0090.01216.66
7.4.100.0120.00916.63
7.4.90.0110.00616.49
7.4.80.0070.01719.39
7.4.70.0000.01716.57
7.4.60.0160.00016.38
7.4.50.0040.00416.21
7.4.40.0100.00022.77
7.4.30.0110.00516.39
7.4.00.0060.00615.16
7.3.330.0000.00513.14
7.3.320.0020.00313.43
7.3.310.0070.00016.37
7.3.300.0040.00416.32
7.3.290.0040.01116.33
7.3.280.0110.00616.37
7.3.270.0100.00717.40
7.3.260.0100.00918.24
7.3.250.0160.00816.64
7.3.240.0000.01616.43
7.3.230.0130.00816.52
7.3.210.0170.00016.36
7.3.200.0090.00919.39
7.3.190.0070.01016.46
7.3.180.0120.00416.60
7.3.170.0030.01316.36
7.3.160.0070.01016.34
7.3.120.0030.00314.81
7.2.330.0120.00616.73
7.2.320.0070.01416.68
7.2.310.0080.01216.46
7.2.300.0090.00616.64
7.2.290.0110.00516.49
7.2.60.0060.00917.11
7.1.200.0030.00715.94
7.1.70.0030.00717.16
7.1.60.0030.01719.24
7.1.50.0030.02217.11
7.1.00.0030.04022.42
7.0.200.0090.00016.40
7.0.140.0100.06721.99
7.0.60.0000.03721.83
7.0.50.0170.07317.80
7.0.40.0070.06320.27
7.0.30.0170.04720.21
7.0.20.0230.04720.19
7.0.10.0070.09020.07
7.0.00.0130.08320.25
5.6.280.0000.07721.11
5.6.210.0030.05320.70
5.6.200.0130.07718.18
5.6.190.0100.08320.57
5.6.180.0270.04720.42
5.6.170.0400.07720.53
5.6.160.0070.08320.61
5.6.150.0100.07718.19
5.6.140.0000.04318.15
5.6.130.0000.04718.18
5.6.120.0030.09021.06
5.6.110.0070.08321.01
5.6.100.0070.08721.07
5.6.90.0200.06321.01
5.6.80.0030.08020.38
5.5.350.0030.03720.41
5.5.340.0130.08018.09
5.5.330.0130.08020.27
5.5.320.0270.08020.27
5.5.310.0400.04020.31
5.5.300.0070.08018.05
5.5.290.0030.04017.95
5.5.280.0030.05720.91
5.5.270.0130.07720.77
5.5.260.0030.04320.68
5.5.250.0170.07020.47
5.5.240.0100.07020.18
5.4.450.0130.07019.50
5.4.440.0100.05019.54
5.4.430.0100.07719.30
5.4.420.0200.06019.19
5.4.410.0130.05319.07
5.4.400.0070.06018.93
5.4.390.0070.08019.20
5.4.380.0130.06718.85
5.4.370.0070.04019.12
5.4.360.0100.05018.98
5.4.350.0070.04718.94
5.4.340.0070.07718.92
5.4.320.0070.07319.00
5.4.310.0030.05018.87
5.4.300.0100.04319.24
5.4.290.0100.07318.87
5.4.280.0000.05319.07
5.4.270.0070.04718.98
5.4.260.0100.06018.86
5.4.250.0070.04319.14
5.4.240.0030.08019.14
5.4.230.0030.04018.86
5.4.220.0070.06319.14
5.4.210.0130.04019.24
5.4.200.0070.03718.84
5.4.190.0030.04718.96
5.4.180.0130.04018.84
5.4.170.0030.04018.91
5.4.160.0000.04018.94
5.4.150.0070.04319.13
5.4.140.0100.05716.46
5.4.130.0130.06316.36
5.4.120.0130.03716.46
5.4.110.0130.07016.32
5.4.100.0070.05016.39
5.4.90.0030.06016.52
5.4.80.0070.07716.34
5.4.70.0000.07716.48
5.4.60.0100.06016.50
5.4.50.0100.04016.44
5.4.40.0100.07016.31
5.4.30.0030.04316.38
5.4.20.0070.06716.27
5.4.10.0070.05316.40
5.4.00.0030.04015.86
5.3.290.0030.05314.72
5.3.280.0030.06014.63
5.3.270.0070.05014.64
5.3.260.0030.08314.61
5.3.250.0100.03014.52
5.3.240.0070.04714.64
5.3.230.0030.08314.48
5.3.220.0000.04714.62
5.3.210.0070.08014.57
5.3.200.0030.05314.64
5.3.190.0130.05314.57
5.3.180.0130.05014.62
5.3.170.0100.07314.45
5.3.160.0100.06314.57
5.3.150.0070.06314.61
5.3.140.0100.07714.74
5.3.130.0100.04314.69
5.3.120.0070.04014.54
5.3.110.0070.07014.71
5.3.100.0030.06014.06
5.3.90.0070.06014.03
5.3.80.0070.07314.02
5.3.70.0030.05014.04
5.3.60.0000.07714.15
5.3.50.0070.07313.88
5.3.40.0000.04714.03
5.3.30.0070.07013.94
5.3.20.0230.05713.67
5.3.10.0000.07713.70
5.3.00.0000.04713.79
5.2.170.0030.06311.17
5.2.160.0030.03711.16
5.2.150.0100.05711.21
5.2.140.0030.06711.29
5.2.130.0070.03311.04
5.2.120.0070.04711.15
5.2.110.0130.05011.13
5.2.100.0030.06011.15
5.2.90.0030.05311.06
5.2.80.0030.06311.03
5.2.70.0100.06011.13
5.2.60.0030.06010.96
5.2.50.0030.04711.01
5.2.40.0030.06310.95
5.2.30.0030.06310.89
5.2.20.0030.06710.88
5.2.10.0030.04010.76
5.2.00.0130.05010.77
5.1.60.0030.0509.91
5.1.50.0070.05010.07
5.1.40.0170.0409.96
5.1.30.0030.05710.22
5.1.20.0030.04310.35
5.1.10.0030.03310.08
5.1.00.0030.0539.97
5.0.50.0000.0278.69
5.0.40.0030.0178.41
5.0.30.0100.0538.19
5.0.20.0000.0308.22
5.0.10.0030.0178.12
5.0.00.0000.0608.14
4.4.90.0030.0337.77
4.4.80.0070.0337.77
4.4.70.0100.0277.77
4.4.60.0030.0377.77
4.4.50.0030.0377.77
4.4.40.0000.0377.77
4.4.30.0030.0337.77
4.4.20.0070.0337.77
4.4.10.0000.0207.77
4.4.00.0030.0537.77
4.3.110.0000.0207.77
4.3.100.0000.0237.77
4.3.90.0070.0307.77
4.3.80.0000.0507.77
4.3.70.0000.0337.77
4.3.60.0030.0277.77
4.3.50.0030.0207.77
4.3.40.0030.0437.77
4.3.30.0000.0377.77
4.3.20.0000.0277.77
4.3.10.0000.0207.77
4.3.00.0000.0277.77

preferences:
28.69 ms | 403 KiB | 5 Q