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); var_dump($item, $next); 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.60.0090.00616.75
8.3.50.0120.00622.95
8.3.40.0040.01118.85
8.3.30.0080.00618.92
8.3.20.0040.00420.34
8.3.10.0040.00720.66
8.3.00.0040.00419.46
8.2.180.0070.00716.50
8.2.170.0060.01222.96
8.2.160.0070.01020.45
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0060.00320.97
8.2.110.0090.00020.52
8.2.100.0080.00418.22
8.2.90.0040.00419.21
8.2.80.0040.00417.97
8.2.70.0050.00317.62
8.2.60.0000.00817.93
8.2.50.0080.00018.07
8.2.40.0000.00818.20
8.2.30.0000.00719.44
8.2.20.0040.00417.82
8.2.10.0000.00717.98
8.2.00.0080.00017.55
8.1.280.0040.01825.92
8.1.270.0040.00423.71
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00323.98
8.1.230.0040.00719.15
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00717.13
8.1.190.0030.00617.36
8.1.180.0080.00018.10
8.1.170.0030.00718.59
8.1.160.0040.00421.93
8.1.150.0040.00418.90
8.1.140.0030.00617.50
8.1.130.0000.00817.70
8.1.120.0080.00017.37
8.1.110.0040.00417.45
8.1.100.0020.00517.49
8.1.90.0030.00517.39
8.1.80.0000.00817.50
8.1.70.0060.00017.45
8.1.60.0000.00717.50
8.1.50.0030.00617.57
8.1.40.0030.00617.45
8.1.30.0070.00017.54
8.1.20.0040.00417.63
8.1.10.0040.00417.55
8.1.00.0000.00817.53
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0030.00318.43
8.0.270.0070.00017.24
8.0.260.0000.00617.32
8.0.250.0000.00717.06
8.0.240.0000.00817.08
8.0.230.0070.00016.99
8.0.220.0050.00316.95
8.0.210.0030.00316.83
8.0.200.0070.00016.90
8.0.190.0000.00816.98
8.0.180.0000.00716.96
8.0.170.0040.00417.07
8.0.160.0040.00416.99
8.0.150.0070.00016.89
8.0.140.0030.00816.89
8.0.130.0000.00613.30
8.0.120.0080.00016.94
8.0.110.0030.00616.95
8.0.100.0050.00316.95
8.0.90.0000.00816.86
8.0.80.0190.00317.01
8.0.70.0000.00816.74
8.0.60.0040.00417.00
8.0.50.0030.00516.83
8.0.30.0140.00817.13
8.0.20.0120.00717.40
8.0.10.0000.00717.07
8.0.00.0120.00616.90
7.4.330.0050.00015.09
7.4.320.0000.00616.57
7.4.300.0030.00316.48
7.4.290.0000.00716.53
7.4.280.0000.00716.64
7.4.270.0040.00416.52
7.4.260.0030.00316.48
7.4.250.0080.00016.55
7.4.240.0050.00216.49
7.4.230.0000.00716.48
7.4.220.0090.00916.54
7.4.210.0070.00716.63
7.4.200.0000.00716.43
7.4.160.0040.01916.48
7.4.150.0090.01217.40
7.4.140.0120.00617.86
7.4.130.0090.01116.39
7.4.120.0090.01116.49
7.4.110.0040.01316.52
7.4.100.0040.01416.58
7.4.90.0100.01116.45
7.4.80.0100.01219.39
7.4.70.0070.01116.39
7.4.60.0100.01016.45
7.4.50.0040.00016.46
7.4.40.0150.00616.61
7.4.30.0110.00716.58
7.4.00.0100.00615.10
7.3.330.0050.00013.26
7.3.320.0050.00013.32
7.3.310.0030.00516.30
7.3.300.0000.00616.34
7.3.290.0090.00616.29
7.3.280.0090.01116.34
7.3.270.0060.01217.40
7.3.260.0140.00316.37
7.3.250.0080.01016.35
7.3.240.0090.00916.48
7.3.230.0080.01116.40
7.3.210.0100.01016.54
7.3.200.0110.00719.39
7.3.190.0140.01116.45
7.3.180.0080.00816.48
7.3.170.0080.01316.31
7.3.160.0070.01016.48
7.3.00.0060.00916.32
7.2.330.0130.00416.81
7.2.320.0030.01516.70
7.2.310.0110.00816.54
7.2.300.0150.00316.66
7.2.290.0060.01016.58
7.2.130.0100.00316.88
7.2.120.0070.01116.90
7.2.110.0080.00416.47
7.2.100.0070.00717.08
7.2.90.0030.00916.55
7.2.80.0040.01117.04
7.2.70.0060.00316.93
7.2.60.0090.00516.96
7.2.50.0060.00616.92
7.2.40.0040.00816.72
7.2.30.0000.01316.69
7.2.20.0120.00316.82
7.2.10.0060.01017.04
7.2.00.0050.00518.22
7.1.250.0100.00315.78
7.1.240.0110.00015.61
7.1.230.0090.00315.73
7.1.220.0030.01015.85
7.1.210.0040.01115.73
7.1.200.0060.00615.63
7.1.190.0040.00815.80
7.1.180.0100.00315.55
7.1.170.0100.00015.52
7.1.160.0000.00915.62
7.1.150.0040.00815.64
7.1.140.0110.00415.85
7.1.130.0070.00315.78
7.1.120.0000.00915.74
7.1.110.0040.00715.84
7.1.100.0000.01115.79
7.1.90.0090.00015.67
7.1.80.0040.00915.91
7.1.70.0040.00616.50
7.1.60.0070.01117.55
7.1.50.0050.00916.37
7.1.40.0000.01315.70
7.1.30.0030.00715.74
7.1.20.0000.00815.82
7.1.10.0030.01015.87
7.1.00.0050.04819.10
7.0.330.0030.00915.11
7.0.320.0030.00715.42
7.0.310.0070.01015.36
7.0.300.0090.00615.29
7.0.290.0030.01015.37
7.0.280.0080.00515.41
7.0.270.0060.00615.10
7.0.260.0040.00415.18
7.0.250.0100.00015.23
7.0.240.0030.00915.21
7.0.230.0110.00315.06
7.0.220.0040.01115.37
7.0.210.0030.00615.20
7.0.200.0680.00915.03
7.0.190.0000.00815.21
7.0.180.0060.00315.23
7.0.170.0040.00714.97
7.0.160.0040.00715.10
7.0.150.0090.00315.40
7.0.140.0010.04118.62
7.0.130.0030.00515.45
7.0.120.0090.00615.54
7.0.110.0040.00815.42
7.0.100.0090.00615.15
7.0.90.0060.00615.48
7.0.80.0030.00515.27
7.0.70.0110.00315.51
7.0.60.0100.04017.71
7.0.50.0050.03316.78
7.0.40.0080.04216.85
7.0.30.0200.02316.71
7.0.20.0100.03816.71
7.0.10.0050.03916.70
7.0.00.0090.03616.74
5.6.380.0040.01114.48
5.6.370.0040.00714.39
5.6.360.0090.00314.18
5.6.350.0000.01014.39
5.6.340.0150.00014.51
5.6.330.0070.00414.55
5.6.320.0070.00314.31
5.6.310.0100.00314.36
5.6.300.0070.00314.41
5.6.290.0000.01013.89
5.6.280.0030.04117.38
5.6.270.0000.01414.57
5.6.260.0000.00714.08
5.6.250.0080.00014.06
5.6.240.0070.00714.32
5.6.230.0030.00914.27
5.6.220.0000.00914.09
5.6.210.0030.02617.52
5.6.200.0070.02816.16
5.6.190.0110.04317.46
5.6.180.0170.02417.54
5.6.170.0160.02317.28
5.6.160.0080.04217.29
5.6.150.0050.02916.28
5.6.140.0090.04416.31
5.6.130.0060.04216.42
5.6.120.0060.03017.71
5.6.110.0060.02317.62
5.6.100.0050.04717.56
5.6.90.0120.03017.52
5.6.80.0080.02817.22
5.6.70.0000.00814.32
5.6.60.0120.00014.36
5.6.50.0040.01113.89
5.6.40.0000.01314.30
5.6.30.0060.00614.03
5.6.20.0030.00614.24
5.6.10.0030.01014.29
5.6.00.0040.00814.13
5.5.380.0070.00311.20
5.5.370.0040.00711.18
5.5.360.0040.00711.18
5.5.350.0100.04315.79
5.5.340.0050.04314.63
5.5.330.0030.02815.76
5.5.320.0150.02215.72
5.5.310.0130.02015.81
5.5.300.0030.02314.56
5.5.290.0030.03014.54
5.5.280.0070.03416.10
5.5.270.0030.04016.02
5.5.260.0090.03516.03
5.5.250.0050.02115.84
5.5.240.0080.02515.72
5.5.230.0060.00311.18
5.5.220.0000.00711.18
5.5.210.0030.00311.18
5.5.200.0040.00411.18
5.5.190.0000.01011.19
5.5.180.0030.00311.18
5.5.170.0000.00811.18
5.5.160.0070.00011.18
5.5.150.0050.00211.18
5.5.140.0060.00311.18
5.5.130.0030.00611.20
5.5.120.0000.00711.18
5.5.110.0040.00411.18
5.5.100.0000.00911.18
5.5.90.0000.00611.18
5.5.80.0030.00311.18
5.5.70.0000.00711.18
5.5.60.0030.00711.18
5.5.50.0000.00811.18
5.5.40.0100.00011.18
5.5.30.0040.00411.18
5.5.20.0000.00711.18
5.5.10.0040.00411.18
5.5.00.0030.00311.18
5.4.450.0040.02215.23
5.4.440.0130.02515.17
5.4.430.0180.03015.34
5.4.420.0270.02215.41
5.4.410.0100.02115.22
5.4.400.0070.02215.13
5.4.390.0160.02615.08
5.4.380.0190.02614.95
5.4.370.0080.03214.94
5.4.360.0120.03914.85
5.4.350.0080.03114.98
5.4.340.0120.03714.94
5.4.330.0030.00611.18
5.4.320.0020.02311.84
5.4.310.0040.02111.84
5.4.300.0080.01811.84
5.4.290.0040.02111.84
5.4.280.0060.02411.79
5.4.270.0020.02611.79
5.4.260.0020.02311.79
5.4.250.0060.01911.79
5.4.240.0040.02311.79
5.4.230.0060.02511.78
5.4.220.0070.02311.78
5.4.210.0050.02111.78
5.4.200.0080.01911.78
5.4.190.0070.02311.78
5.4.180.0060.02011.78
5.4.170.0050.02411.79
5.4.160.0050.02211.79
5.4.150.0080.02011.78
5.4.140.0040.02211.63
5.4.130.0070.02011.62
5.4.120.0080.02011.60
5.4.110.0070.01911.60
5.4.100.0070.02611.60
5.4.90.0030.02111.59
5.4.80.0050.02211.60
5.4.70.0070.02111.59
5.4.60.0050.02211.59
5.4.50.0060.02611.59
5.4.40.0050.02511.59
5.4.30.0020.02611.59
5.4.20.0040.02611.59
5.4.10.0040.02211.59
5.4.00.0020.02711.33
5.3.290.0070.02111.99
5.3.280.0040.02611.94
5.3.270.0050.02311.95
5.3.260.0070.02311.95
5.3.250.0050.02411.95
5.3.240.0060.02711.95
5.3.230.0040.02711.94
5.3.220.0050.02511.93
5.3.210.0080.01911.93
5.3.200.0040.02511.93
5.3.190.0050.02411.93
5.3.180.0020.02311.92
5.3.170.0050.02111.92
5.3.160.0030.02411.92
5.3.150.0050.02311.92
5.3.140.0050.02711.92
5.3.130.0040.02611.92
5.3.120.0040.03011.92
5.3.110.0050.02211.92
5.3.100.0070.02011.65
5.3.90.0040.02011.64
5.3.80.0080.02011.64
5.3.70.0090.02011.64
5.3.60.0040.02111.63
5.3.50.0080.02111.60
5.3.40.0050.02211.60
5.3.30.0050.02311.58
5.3.20.0060.02211.47
5.3.10.0050.02311.46
5.3.00.0070.02511.45
5.2.170.0060.02110.20
5.2.160.0070.01810.20
5.2.150.0070.01910.20
5.2.140.0040.02110.20
5.2.130.0060.01910.18
5.2.120.0040.02010.18
5.2.110.0050.01810.18
5.2.100.0040.01610.18
5.2.90.0030.02010.18
5.2.80.0040.01910.17
5.2.70.0040.02110.18
5.2.60.0030.01810.15
5.2.50.0030.01710.14
5.2.40.0040.01810.13
5.2.30.0050.02010.12
5.2.20.0040.01710.11
5.2.10.0080.01610.06
5.2.00.0060.0169.99
5.1.60.0010.0169.63
5.1.50.0050.0199.63
5.1.40.0030.0169.62
5.1.30.0040.0199.80
5.1.20.0010.0199.81
5.1.10.0050.0159.67
5.1.00.0030.0209.67
5.0.50.0030.0138.91
5.0.40.0060.0118.84
5.0.30.0030.0178.75
5.0.20.0060.0118.73
5.0.10.0040.0118.72
5.0.00.0020.0198.72
4.4.90.0030.0137.98
4.4.80.0020.0107.96
4.4.70.0040.0117.96
4.4.60.0020.0127.97
4.4.50.0010.0127.97
4.4.40.0020.0157.94
4.4.30.0040.0107.96
4.4.20.0030.0148.01
4.4.10.0020.0138.01
4.4.00.0010.0157.97
4.3.110.0050.0127.92
4.3.100.0040.0147.92
4.3.90.0010.0127.91
4.3.80.0020.0157.88
4.3.70.0020.0147.90
4.3.60.0030.0107.90
4.3.50.0020.0167.90
4.3.40.0020.0157.85
4.3.30.0040.0147.24
4.3.20.0030.0077.23
4.3.10.0030.0137.21
4.3.00.0030.01014.67

preferences:
43.37 ms | 401 KiB | 5 Q