3v4l.org

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

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.70.0120.00316.75
8.3.60.0180.00018.68
8.3.50.0110.00721.87
8.3.40.0110.00718.98
8.3.30.0110.00418.79
8.3.20.0000.00720.20
8.3.10.0050.00320.66
8.3.00.0040.00421.93
8.2.180.0000.01616.63
8.2.170.0110.00322.96
8.2.160.0070.00722.34
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00421.09
8.2.120.0000.00826.35
8.2.110.0090.00919.45
8.2.100.0070.00717.93
8.2.90.0030.00519.22
8.2.80.0030.00617.97
8.2.70.0040.00417.60
8.2.60.0000.01017.93
8.2.50.0040.00418.09
8.2.40.0080.00320.34
8.2.30.0050.00319.38
8.2.20.0070.00017.82
8.2.10.0050.00218.21
8.2.00.0040.00418.05
8.1.280.0060.00925.92
8.1.270.0110.00721.94
8.1.260.0080.00028.09
8.1.250.0000.00728.09
8.1.240.0090.00022.20
8.1.230.0040.00717.64
8.1.220.0060.00317.78
8.1.210.0030.00518.77
8.1.200.0070.00717.10
8.1.190.0060.00317.38
8.1.180.0040.00418.10
8.1.170.0050.00518.47
8.1.160.0030.00520.79
8.1.150.0000.00719.02
8.1.140.0050.00319.64
8.1.130.0070.00017.71
8.1.120.0000.00717.38
8.1.110.0080.00017.30
8.1.100.0000.00717.39
8.1.90.0000.00917.33
8.1.80.0040.00417.54
8.1.70.0040.00417.48
8.1.60.0030.00517.55
8.1.50.0090.00017.53
8.1.40.0000.00817.46
8.1.30.0040.00417.64
8.1.20.0040.00417.55
8.1.10.0050.00217.68
8.1.00.0040.00417.54
8.0.300.0020.00518.77
8.0.290.0080.00016.75
8.0.280.0030.00318.45
8.0.270.0070.00017.27
8.0.260.0080.00017.28
8.0.250.0060.00316.93
8.0.240.0050.00316.91
8.0.230.0030.00317.05
8.0.220.0040.00416.97
8.0.210.0030.00316.98
8.0.200.0060.00317.00
8.0.190.0040.00416.94
8.0.180.0040.00416.93
8.0.170.0040.00416.97
8.0.160.0000.00816.88
8.0.150.0040.00416.94
8.0.140.0000.00816.84
8.0.130.0000.00613.37
8.0.120.0080.00016.94
8.0.110.0040.00416.95
8.0.100.0040.00416.94
8.0.90.0040.00416.95
8.0.80.0060.00916.95
8.0.70.0000.00717.02
8.0.60.0000.00716.92
8.0.50.0070.00016.79
8.0.30.0150.00317.06
8.0.20.0130.00617.40
8.0.10.0040.00417.01
8.0.00.0070.01116.93
7.4.330.0000.00516.84
7.4.320.0030.00316.46
7.4.300.0030.00316.43
7.4.290.0000.00716.52
7.4.280.0000.00916.55
7.4.270.0000.00716.56
7.4.260.0080.00016.45
7.4.250.0080.00016.39
7.4.240.0000.00716.54
7.4.230.0030.00616.63
7.4.220.0120.00616.56
7.4.210.0030.01016.63
7.4.200.0060.00316.32
7.4.160.0000.01516.64
7.4.150.0130.00417.40
7.4.140.0090.00917.86
7.4.130.0130.01216.62
7.4.120.0110.01016.48
7.4.110.0090.00716.50
7.4.100.0140.00316.80
7.4.90.0080.00816.45
7.4.80.0100.00719.39
7.4.70.0060.00916.58
7.4.60.0040.01416.55
7.4.50.0070.00216.59
7.4.40.0000.01816.60
7.4.30.0060.01116.44
7.4.00.0050.00914.98
7.3.330.0030.00613.42
7.3.320.0000.00613.43
7.3.310.0000.00716.45
7.3.300.0030.00316.26
7.3.290.0070.00816.43
7.3.280.0090.00816.49
7.3.270.0080.01617.40
7.3.260.0090.01416.68
7.3.250.0110.00716.52
7.3.240.0110.00616.45
7.3.230.0160.01116.39
7.3.210.0170.00016.50
7.3.200.0120.00416.66
7.3.190.0110.00516.38
7.3.180.0040.01216.34
7.3.170.0130.01016.50
7.3.160.0110.00616.54
7.3.120.0040.00914.84
7.3.110.0030.01215.05
7.3.100.0070.00914.93
7.3.90.0100.00514.78
7.3.80.0070.00714.88
7.3.70.0090.00314.95
7.3.60.0070.00714.79
7.3.50.0060.00614.67
7.3.40.0090.00414.85
7.3.30.0060.00614.54
7.3.20.0070.00716.67
7.3.10.0040.00916.83
7.3.00.0070.00516.83
7.2.330.0080.01116.55
7.2.320.0030.01316.80
7.2.310.0060.01616.51
7.2.300.0000.01616.76
7.2.290.0130.00316.47
7.2.250.0030.01515.30
7.2.240.0110.00714.88
7.2.230.0070.01015.19
7.2.220.0060.00815.08
7.2.210.0030.00914.86
7.2.200.0050.01114.96
7.2.190.0050.00814.96
7.2.180.0070.00714.98
7.2.170.0080.00715.07
7.2.60.0030.00916.78
7.2.00.0000.01719.52
7.1.330.0050.01015.85
7.1.320.0090.00315.56
7.1.310.0060.00715.95
7.1.300.0050.00615.76
7.1.290.0060.00615.71
7.1.280.0090.00415.73
7.1.270.0040.00915.78
7.1.260.0050.00915.93
7.1.200.0060.00915.70
7.1.70.0080.00317.02
7.1.60.0030.00717.29
7.1.50.0260.01334.57
7.1.00.0030.07322.45
7.0.200.0070.01016.88
7.0.60.0130.06721.82
7.0.50.0070.04317.85
7.0.40.0030.05320.09
7.0.30.0470.07020.20
7.0.20.0370.06720.11
7.0.10.0030.06320.07
7.0.00.0070.08720.25
5.6.280.0070.04320.87
5.6.210.0070.08020.52
5.6.200.0170.07018.25
5.6.190.0000.05720.46
5.6.180.0270.07020.63
5.6.170.0300.07320.45
5.6.160.0070.08720.50
5.6.150.0030.08018.18
5.6.140.0100.07718.18
5.6.130.0030.04018.18
5.6.120.0030.05321.00
5.6.110.0170.08021.15
5.6.100.0130.07721.02
5.6.90.0200.05321.13
5.6.80.0130.07720.39
5.5.350.0230.03720.34
5.5.340.0170.04317.99
5.5.330.0130.07720.35
5.5.320.0300.07720.34
5.5.310.0300.04020.32
5.5.300.0030.04017.92
5.5.290.0070.03717.97
5.5.280.0000.08720.66
5.5.270.0030.06320.94
5.5.260.0170.08020.80
5.5.250.0070.08720.51
5.5.240.0000.08320.30

preferences:
59.06 ms | 401 KiB | 5 Q