3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $bar; public function __construct(Bar $bar) { $this->bar = $bar; } public function __get($key) { $exploded = explode('.', $key); $item = $this; do { $next = array_shift($exploded); if (!property_exists($item, $next)) { return null; } $item = $item->{$next}; } while ($exploded); return $item; } } class Bar { public $foo = 'test'; } $foo = new Foo(new Bar); var_dump($foo->bar.test);

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.40.0110.00318.88
8.3.30.0090.00619.02
8.3.20.0070.00020.38
8.3.10.0090.00318.71
8.3.00.0050.00319.50
8.2.170.0130.00622.96
8.2.160.0060.00820.52
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.16
8.2.110.0060.00320.39
8.2.100.0040.00818.09
8.2.90.0000.00819.27
8.2.80.0060.00317.97
8.2.70.0000.00917.63
8.2.60.0030.00617.93
8.2.50.0000.00818.07
8.2.40.0000.00918.28
8.2.30.0000.00719.30
8.2.20.0000.00817.86
8.2.10.0040.00418.07
8.2.00.0000.00717.68
8.1.270.0040.00423.80
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00023.91
8.1.230.0040.00819.14
8.1.220.0000.00717.76
8.1.210.0030.00518.77
8.1.200.0000.01017.35
8.1.190.0070.00017.23
8.1.180.0000.00818.10
8.1.170.0090.00018.51
8.1.160.0000.00721.93
8.1.150.0070.00018.84
8.1.140.0040.00417.43
8.1.130.0030.00317.74
8.1.120.0000.00717.38
8.1.110.0040.00417.41
8.1.100.0000.00817.51
8.1.90.0000.00717.45
8.1.80.0040.00417.37
8.1.70.0030.00317.46
8.1.60.0000.00817.56
8.1.50.0050.00317.45
8.1.40.0030.00517.50
8.1.30.0000.00817.61
8.1.20.0000.00717.55
8.1.10.0030.00517.57
8.1.00.0050.00317.37
8.0.300.0030.00518.77
8.0.290.0050.00216.88
8.0.280.0080.00018.46
8.0.270.0000.00717.26
8.0.260.0030.00317.23
8.0.250.0070.00016.99
8.0.240.0050.00216.93
8.0.230.0040.00417.06
8.0.220.0080.00016.91
8.0.210.0000.00816.96
8.0.200.0000.00716.90
8.0.190.0030.00516.88
8.0.180.0040.00416.95
8.0.170.0040.00416.91
8.0.160.0040.00417.00
8.0.150.0050.00216.87
8.0.140.0070.00316.89
8.0.130.0030.00313.45
8.0.120.0080.00016.91
8.0.110.0040.00416.96
8.0.100.0000.00816.81
8.0.90.0040.00417.00
8.0.80.0080.00816.96
8.0.70.0040.00416.82
8.0.60.0040.00416.91
8.0.50.0000.00716.93
8.0.30.0100.00917.20
8.0.20.0100.01117.40
8.0.10.0000.00716.96
8.0.00.0100.01016.69
7.4.330.0000.00515.02
7.4.320.0060.00016.55
7.4.300.0000.00716.51
7.4.290.0040.00416.55
7.4.280.0070.00016.59
7.4.270.0030.00316.48
7.4.260.0070.00016.58
7.4.250.0000.00816.36
7.4.240.0020.00516.40
7.4.230.0030.00316.48
7.4.220.0030.01416.70
7.4.210.0110.00316.53
7.4.200.0030.00316.40
7.4.160.0040.01416.47
7.4.150.0190.00017.40
7.4.140.0060.01117.86
7.4.130.0140.00316.53
7.4.120.0060.01016.49
7.4.110.0100.00716.37
7.4.100.0120.01216.59
7.4.90.0130.00616.50
7.4.80.0140.00319.39
7.4.70.0120.00416.54
7.4.60.0060.01116.38
7.4.50.0000.00416.32
7.4.40.0140.00416.31
7.4.30.0090.01316.50
7.4.00.0030.01214.89
7.3.330.0020.00213.27
7.3.320.0050.00013.50
7.3.310.0070.00016.41
7.3.300.0000.00616.44
7.3.290.0070.00716.41
7.3.280.0070.01016.42
7.3.270.0030.01417.40
7.3.260.0080.01516.43
7.3.250.0130.00816.50
7.3.240.0100.01116.55
7.3.230.0110.00816.50
7.3.210.0090.01216.54
7.3.200.0080.01719.39
7.3.190.0180.00616.50
7.3.180.0090.00616.29
7.3.170.0120.01216.45
7.3.160.0050.01116.51
7.3.120.0110.00015.00
7.3.110.0110.00715.05
7.3.100.0060.01214.64
7.3.90.0060.00614.97
7.3.80.0070.00714.91
7.3.70.0080.00514.79
7.3.60.0040.01114.75
7.3.50.0000.01014.78
7.3.40.0030.00914.68
7.3.30.0080.00414.90
7.3.20.0070.01016.74
7.3.10.0090.00416.69
7.3.00.0080.00316.83
7.2.330.0130.00316.47
7.2.320.0030.01916.85
7.2.310.0060.00916.82
7.2.300.0120.00916.42
7.2.290.0060.01016.80
7.2.250.0040.01515.26
7.2.240.0030.01714.83
7.2.230.0000.01814.75
7.2.220.0090.00314.97
7.2.210.0000.01415.36
7.2.200.0070.00715.21
7.2.190.0040.00714.77
7.2.180.0030.00614.87
7.2.170.0000.01015.15
7.2.130.0040.00716.81
7.2.120.0100.00316.70
7.2.110.0000.00916.95
7.2.100.0000.01216.90
7.2.90.0100.00316.39
7.2.80.0070.00716.25
7.2.70.0030.01017.00
7.2.60.0030.00916.56
7.2.50.0090.01216.62
7.2.40.0040.01116.97
7.2.30.0070.00716.98
7.2.20.0030.00617.14
7.2.10.0060.00616.96
7.2.00.0020.00817.93
7.1.330.0070.00715.83
7.1.320.0080.00615.80
7.1.310.0120.00315.93
7.1.300.0070.00715.78
7.1.290.0030.00915.70
7.1.280.0080.00415.84
7.1.270.0030.01016.04
7.1.260.0060.00615.86
7.1.250.0000.01015.55
7.1.200.0040.00815.64
7.1.70.0000.00717.26
7.1.60.0170.00719.61
7.1.50.0030.01316.73
7.1.00.0030.07022.44
7.0.200.0070.00715.00
7.0.140.0030.07322.09
7.0.60.0070.04719.96
7.0.50.0000.04317.85
7.0.40.0130.08020.11
7.0.30.0130.04320.09
7.0.20.0270.04720.16
7.0.10.0100.08020.24
7.0.00.0030.09020.26
5.6.280.0070.07020.91
5.6.210.0070.03720.66
5.6.200.0000.05018.16
5.6.190.0170.07320.41
5.6.180.0230.04320.46
5.6.170.0330.05720.56
5.6.160.0100.07020.55
5.6.150.0070.08018.17
5.6.140.0070.08318.23
5.6.130.0070.04018.20
5.6.120.0130.08020.94
5.6.110.0070.03721.09
5.6.100.0100.06720.99
5.6.90.0070.08721.11
5.6.80.0070.07720.41
5.5.350.0170.07020.44
5.5.340.0070.03718.04
5.5.330.0070.06020.52
5.5.320.0670.07020.20
5.5.310.0300.04720.30
5.5.300.0000.04318.04
5.5.290.0100.08018.00
5.5.280.0030.08320.88
5.5.270.0100.08020.63
5.5.260.0130.07020.73
5.5.250.0030.04320.68
5.5.240.0170.07320.36
5.4.450.0300.03319.39
5.4.440.0270.02719.41
5.4.430.0600.04019.45
5.4.420.0100.04319.52
5.4.410.0200.03719.44
5.4.400.0130.04319.15
5.4.390.0170.04719.13
5.4.380.0100.07318.56
5.4.370.0300.05718.73
5.4.360.0330.05718.78
5.4.350.0030.07018.72
5.4.340.0200.05318.70
5.4.320.0100.04312.50
5.4.310.0050.04512.50
5.4.300.0080.03612.50
5.4.290.0100.03512.50
5.4.280.0100.03412.40
5.4.270.0090.03812.39
5.4.260.0030.04012.40
5.4.250.0060.04112.39
5.4.240.0080.04012.40
5.4.230.0100.03512.39
5.4.220.0070.03412.39
5.4.210.0080.03912.39
5.4.200.0100.03812.39
5.4.190.0060.03912.39
5.4.180.0070.04412.39
5.4.170.0020.04512.40
5.4.160.0080.03712.39
5.4.150.0030.04212.39
5.4.140.0090.03512.07
5.4.130.0080.03612.06
5.4.120.0050.04012.02
5.4.110.0090.04212.01
5.4.100.0050.03512.02
5.4.90.0100.04612.01
5.4.80.0070.03912.02
5.4.70.0080.04012.01
5.4.60.0080.03312.01
5.4.50.0090.03712.01
5.4.40.0090.04312.00
5.4.30.0120.03512.00
5.4.20.0080.04912.00
5.4.10.0060.03612.00
5.4.00.0080.03211.49
5.3.290.0080.04012.80
5.3.280.0080.04012.71
5.3.270.0090.04512.73
5.3.260.0100.03912.72
5.3.250.0100.04112.71
5.3.240.0080.03612.72
5.3.230.0050.03912.71
5.3.220.0090.03412.68
5.3.210.0040.04712.68
5.3.200.0070.03912.68
5.3.190.0050.04512.68
5.3.180.0080.04612.67
5.3.170.0040.03812.66
5.3.160.0060.03712.67
5.3.150.0090.03412.67
5.3.140.0090.03312.66
5.3.130.0070.04212.66
5.3.120.0080.04212.66
5.3.110.0060.04312.66
5.3.100.0060.04112.13
5.3.90.0060.04112.11
5.3.80.0060.03712.10
5.3.70.0070.04112.10
5.3.60.0060.04412.09
5.3.50.0070.03612.03
5.3.40.0060.04212.04
5.3.30.0050.03511.99
5.3.20.0060.03511.77
5.3.10.0060.03511.74
5.3.00.0030.03911.73
5.2.170.0080.0279.23
5.2.160.0110.0229.23
5.2.150.0060.0299.23
5.2.140.0050.0309.23
5.2.130.0050.0289.19
5.2.120.0050.0289.18
5.2.110.0090.0279.19
5.2.100.0050.0379.18
5.2.90.0070.0289.18
5.2.80.0100.0289.18
5.2.70.0050.0349.18
5.2.60.0060.0349.14
5.2.50.0040.0329.11
5.2.40.0040.0369.09
5.2.30.0110.0329.05
5.2.20.0070.0299.04
5.2.10.0080.0258.95
5.2.00.0070.0348.82
5.1.60.0040.0278.10
5.1.50.0100.0228.09
5.1.40.0050.0278.07
5.1.30.0060.0288.42
5.1.20.0050.0258.45
5.1.10.0050.0258.17
5.1.00.0030.0288.17
5.0.50.0030.0276.65
5.0.40.0040.0196.51
5.0.30.0040.0436.32
5.0.20.0070.0276.29
5.0.10.0040.0196.27
5.0.00.0050.0296.26
4.4.90.0040.0144.78
4.4.80.0030.0154.76
4.4.70.0030.0194.76
4.4.60.0020.0244.75
4.4.50.0050.0154.77
4.4.40.0040.0264.71
4.4.30.0030.0204.76
4.4.20.0070.0124.84
4.4.10.0070.0194.85
4.4.00.0060.0394.76
4.3.110.0060.0184.67
4.3.100.0020.0194.67
4.3.90.0020.0174.64
4.3.80.0030.0234.58
4.3.70.0040.0144.63
4.3.60.0040.0154.63
4.3.50.0020.0254.63
4.3.40.0040.0284.54
4.3.30.0010.0233.30
4.3.20.0040.0183.28
4.3.10.0030.0163.23
4.3.00.0030.02018.16

preferences:
34.5 ms | 400 KiB | 5 Q