3v4l.org

run code in 300+ PHP versions simultaneously
<?php $object = new stdClass(); $object->foo = 'abc'; $object->bar = 'def'; $list = $object; $field = 'test'; foreach( $list as $key => $value ) { if ( is_object( $value ) ) { $list[ $key ] = $value->$field; } else { $list[ $key ] = $value[ $field ]; } }

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.4.20.0090.00617.86
8.4.10.0100.01017.86
8.3.150.0100.01017.03
8.3.140.0030.00717.29
8.3.130.0090.00018.38
8.3.120.0060.00318.93
8.3.110.0030.00620.94
8.3.100.0000.00824.06
8.3.90.0100.01026.77
8.3.80.0030.00616.74
8.3.70.0150.00017.00
8.3.60.0120.00316.63
8.3.50.0150.00821.14
8.3.40.0070.01418.86
8.3.30.0110.00418.76
8.3.20.0000.00720.51
8.3.10.0030.00623.65
8.3.00.0000.00723.61
8.2.260.0040.00416.59
8.2.250.0090.00616.66
8.2.240.0040.00417.06
8.2.230.0050.00322.58
8.2.220.0000.00937.54
8.2.210.0080.01226.77
8.2.200.0040.00416.50
8.2.190.0000.01416.75
8.2.180.0090.00625.92
8.2.170.0140.00418.93
8.2.160.0070.00722.96
8.2.150.0000.00725.66
8.2.140.0040.01224.66
8.2.130.0000.00826.16
8.2.120.0040.00419.95
8.2.110.0040.00420.52
8.2.100.0090.00317.84
8.2.90.0050.00318.09
8.2.80.0000.00819.25
8.2.70.0040.00417.72
8.2.60.0060.00317.63
8.2.50.0000.00817.75
8.2.40.0050.00317.63
8.2.30.0000.00720.61
8.2.20.0040.00417.85
8.2.10.0040.00418.22
8.2.00.0000.00917.99
8.1.310.0110.00418.49
8.1.300.0000.00818.44
8.1.290.0090.00018.88
8.1.280.0070.01025.92
8.1.270.0060.00622.19
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0030.00723.67
8.1.230.0090.00322.65
8.1.220.0080.00417.79
8.1.210.0030.00618.77
8.1.200.0040.00417.48
8.1.190.0030.00817.25
8.1.180.0050.00318.10
8.1.170.0000.00917.62
8.1.160.0040.00420.77
8.1.150.0000.00718.77
8.1.140.0040.00419.50
8.1.130.0030.00317.70
8.1.120.0000.00817.49
8.1.110.0030.00617.41
8.1.100.0040.00417.37
8.1.90.0000.00717.45
8.1.80.0020.00517.34
8.1.70.0070.00017.47
8.1.60.0000.00717.59
8.1.50.0050.00317.43
8.1.40.0030.00617.40
8.1.30.0080.00017.71
8.1.20.0030.00517.52
8.1.10.0000.00817.46
8.1.00.0080.00017.53
8.0.300.0050.00219.79
8.0.290.0050.00216.75
8.0.280.0000.00718.44
8.0.270.0000.00717.19
8.0.260.0000.00617.18
8.0.250.0000.00716.97
8.0.240.0000.00716.93
8.0.230.0030.00317.01
8.0.220.0000.00716.80
8.0.210.0040.00416.93
8.0.200.0030.00316.95
8.0.190.0000.00816.93
8.0.180.0000.00816.81
8.0.170.0000.00816.96
8.0.160.0080.00016.95
8.0.150.0070.00016.82
8.0.140.0000.00816.80
8.0.130.0050.00013.34
8.0.120.0080.00016.82
8.0.110.0000.00716.91
8.0.100.0040.00416.91
8.0.90.0030.00316.87
8.0.80.0090.00617.00
8.0.70.0040.00416.94
8.0.60.0080.00016.80
8.0.50.0060.00316.95
8.0.30.0070.01217.16
8.0.20.0090.00917.40
8.0.10.0000.00817.03
8.0.00.0160.00416.80
7.4.330.0000.00516.70
7.4.320.0030.00316.45
7.4.300.0030.00316.58
7.4.290.0040.00416.64
7.4.280.0030.00716.64
7.4.270.0030.00316.53
7.4.260.0040.00416.54
7.4.250.0050.00316.49
7.4.240.0020.00516.51
7.4.230.0070.00016.48
7.4.220.0090.01216.70
7.4.210.0030.01516.57
7.4.200.0030.00316.59
7.4.160.0120.00416.44
7.4.150.0140.00317.40
7.4.140.0120.01017.86
7.4.130.0100.00816.62
7.4.120.0110.00716.62
7.4.110.0120.00616.66
7.4.100.0140.01016.66
7.4.90.0170.00016.54
7.4.80.0090.00819.39
7.4.70.0190.00316.52
7.4.60.0100.00616.37
7.4.50.0060.01016.42
7.4.40.0110.00616.48
7.4.30.0120.00916.30
7.4.00.0040.01114.84
7.3.330.0060.00013.11
7.3.320.0030.00313.31
7.3.310.0060.00216.42
7.3.300.0030.00316.39
7.3.290.0030.00416.39
7.3.280.0070.01116.35
7.3.270.0140.00917.40
7.3.260.0000.01616.47
7.3.250.0080.00816.59
7.3.240.0080.01116.50
7.3.230.0070.01016.55
7.3.210.0130.00716.55
7.3.200.0150.00419.39
7.3.190.0030.01416.61
7.3.180.0030.01316.31
7.3.170.0110.01116.52
7.3.160.0100.00616.52
7.3.120.0040.01214.63
7.3.110.0100.00315.09
7.3.100.0110.00015.01
7.3.90.0030.01014.79
7.3.80.0080.00414.63
7.3.70.0100.00314.88
7.3.60.0040.00714.93
7.3.50.0060.00914.63
7.3.40.0030.01014.96
7.3.30.0100.00714.79
7.3.20.0120.00316.79
7.3.10.0000.01816.65
7.3.00.0030.01316.51
7.2.330.0150.00616.69
7.2.320.0160.00816.77
7.2.310.0040.01816.64
7.2.300.0070.01016.75
7.2.290.0040.01316.44
7.2.240.0000.01514.89
7.2.230.0030.01515.08
7.2.220.0080.00615.32
7.2.210.0060.00615.11
7.2.200.0100.00615.12
7.2.190.0070.00715.13
7.2.180.0000.01315.05
7.2.170.0060.00615.18
7.2.160.0090.00615.25
7.2.150.0060.01117.20
7.2.140.0110.00716.89
7.2.130.0120.00316.79
7.2.120.0110.00717.05
7.2.110.0070.01016.74
7.2.100.0030.01117.04
7.2.90.0060.01016.84
7.2.80.0060.01117.08
7.2.70.0030.00716.72
7.2.60.0030.01516.95
7.2.50.0030.01317.16
7.2.40.0100.00316.79
7.2.30.0100.00316.93
7.2.20.0070.00417.03
7.2.10.0070.01016.99
7.2.00.0060.01318.11
7.1.330.0000.01115.81
7.1.320.0120.00015.71
7.1.310.0040.01115.68
7.1.300.0070.00715.92
7.1.290.0030.01015.76
7.1.280.0070.00715.82
7.1.270.0090.00315.94
7.1.260.0040.00415.89
7.1.250.0030.00815.84
7.1.200.0080.00415.68
7.1.70.0000.00817.15
7.1.60.0070.00317.17
7.1.50.0060.01517.01
7.1.00.0070.07322.54
7.0.200.0030.01316.53
7.0.100.0170.07719.92
7.0.90.0030.05019.90
7.0.80.0170.07719.88
7.0.70.0030.07319.88
7.0.60.0100.05019.93
7.0.50.0230.08020.27
7.0.40.0100.07720.05
7.0.30.0030.05019.99
7.0.20.0130.06720.17
7.0.10.0070.04020.18
7.0.00.0030.08020.13
5.6.280.0030.05020.92
5.6.250.0000.06720.59
5.6.240.0030.09320.66
5.6.230.0100.07320.68
5.6.220.0070.06020.66
5.6.210.0100.07720.74
5.6.200.0130.07321.06
5.6.190.0000.08321.00
5.6.180.0070.08321.00
5.6.170.0070.04321.00
5.6.160.0070.04721.05
5.6.150.0070.04321.02
5.6.140.0170.07021.13
5.6.130.0000.08021.07
5.6.120.0100.03721.05
5.6.110.0100.04320.98
5.6.100.0030.07320.91
5.6.90.0100.08020.99
5.6.80.0170.07020.45
5.6.70.0030.04720.39
5.6.60.0000.06020.36
5.6.50.0100.03720.40
5.6.40.0070.07720.40
5.6.30.0070.04020.36
5.6.20.0130.03720.48
5.6.10.0130.05720.35
5.6.00.0030.05020.35
5.5.380.0070.04720.42
5.5.370.0130.07020.38
5.5.360.0130.05720.34
5.5.350.0000.05020.47
5.5.340.0070.08720.64
5.5.330.0230.06320.86
5.5.320.0100.04320.91
5.5.310.0070.08020.89
5.5.300.0070.03720.75
5.5.290.0070.08720.79
5.5.280.0070.06020.78
5.5.270.0070.07020.87
5.5.260.0070.04720.82
5.5.250.0100.04320.64
5.5.240.0130.09320.27
5.5.230.0100.04320.18
5.5.220.0100.04020.20
5.5.210.0170.08320.21
5.5.200.0130.07020.26
5.5.190.0100.04720.14
5.5.180.0070.07020.08
5.5.160.0070.04020.12
5.5.150.0070.05320.21
5.5.140.0000.05020.18
5.5.130.0070.07320.16
5.5.120.0130.06720.18
5.5.110.0070.05320.26
5.5.100.0030.04720.05
5.5.90.0070.06320.00
5.5.80.0030.04720.06
5.5.70.0130.07020.05
5.5.60.0000.04720.15
5.5.50.0200.03019.89
5.5.40.0030.04020.05
5.5.30.0030.06320.02
5.5.20.0100.07720.12
5.5.10.0170.09320.10
5.5.00.0030.06019.97
5.4.450.0130.06719.35
5.4.440.0030.04019.38
5.4.430.0100.03319.37
5.4.420.0030.04319.37
5.4.410.0070.07019.23
5.4.400.0070.07018.83
5.4.390.0170.06018.94
5.4.380.0100.07719.05
5.4.370.0030.05018.90
5.4.360.0170.07018.90
5.4.350.0000.04319.03
5.4.340.0100.04019.09
5.4.320.0070.08319.13
5.4.310.0130.06718.81
5.4.300.0030.04318.96
5.4.290.0070.06019.12
5.4.280.0070.08719.04
5.4.270.0070.05018.96
5.4.260.0000.07019.02
5.4.250.0030.07019.06
5.4.240.0100.07319.09
5.4.230.0130.06718.98
5.4.220.0070.07018.98
5.4.210.0100.06319.02
5.4.200.0030.04019.12
5.4.190.0030.08018.97
5.4.180.0030.06018.79
5.4.170.0170.06719.10
5.4.160.0070.05019.07
5.4.150.0070.07719.00
5.4.140.0030.04016.27
5.4.130.0130.06716.37
5.4.120.0000.07316.36
5.4.110.0030.06016.45
5.4.100.0030.07316.47
5.4.90.0070.03016.42
5.4.80.0030.03716.20
5.4.70.0070.03316.20
5.4.60.0000.07316.30
5.4.50.0130.06316.33
5.4.40.0100.05716.23
5.4.30.0030.05316.18
5.4.20.0130.03316.31
5.4.10.0070.04016.29
5.4.00.0100.06715.77
5.3.290.0070.03714.66
5.3.280.0070.06014.55
5.3.270.0100.04014.59
5.3.260.0030.04014.46
5.3.250.0130.06014.55
5.3.240.0170.06714.61
5.3.230.0070.04314.55
5.3.220.0030.05014.57
5.3.210.0170.06314.53
5.3.200.0000.03714.42
5.3.190.0030.03714.56
5.3.180.0130.06714.42
5.3.170.0070.08014.57
5.3.160.0130.06714.40
5.3.150.0100.03714.41
5.3.140.0100.07314.53
5.3.130.0000.08014.48
5.3.120.0030.06314.55
5.3.110.0070.07014.55
5.3.100.0000.04714.03
5.3.90.0030.04013.85
5.3.80.0030.07014.00
5.3.70.0070.06713.88
5.3.60.0070.04313.96
5.3.50.0070.06313.89
5.3.40.0100.06313.88
5.3.30.0070.07313.77
5.3.20.0030.04713.55
5.3.10.0000.04313.41
5.3.00.0100.06013.61
5.2.170.0100.03010.93
5.2.160.0030.05010.98
5.2.150.0000.05311.14
5.2.140.0100.05311.10
5.2.130.0100.05011.02
5.2.120.0030.05711.07
5.2.110.0000.06711.17
5.2.100.0030.04010.93
5.2.90.0030.03311.09
5.2.80.0100.04710.93
5.2.70.0000.03711.08
5.2.60.0100.05310.90
5.2.50.0030.05010.84
5.2.40.0070.04710.86
5.2.30.0200.02310.76
5.2.20.0100.04710.97
5.2.10.0070.02710.78
5.2.00.0100.05010.64
5.1.60.0000.03310.00
5.1.50.0030.05710.01
5.1.40.0070.0239.97
5.1.30.0000.03310.26
5.1.20.0000.04710.37
5.1.10.0030.0409.91
5.1.00.0070.03010.05
5.0.50.0000.0238.59
5.0.40.0070.0178.46
5.0.30.0030.0478.27
5.0.20.0000.0338.27
5.0.10.0070.0308.27
5.0.00.0100.0478.27
4.4.90.0000.0308.27
4.4.80.0030.0208.27
4.4.70.0030.0178.27
4.4.60.0000.0278.27
4.4.50.0030.0208.27
4.4.40.0030.0238.27
4.4.30.0030.0338.27
4.4.20.0030.0138.27
4.4.10.0070.0138.27
4.4.00.0070.0508.27
4.3.110.0000.0208.27
4.3.100.0000.0378.27
4.3.90.0000.0378.27
4.3.80.0000.0408.27
4.3.70.0000.0308.27
4.3.60.0000.0278.27
4.3.50.0000.0278.27
4.3.40.0000.0338.27
4.3.30.0030.0308.27
4.3.20.0000.0278.27
4.3.10.0000.0238.27
4.3.00.0030.0208.27

preferences:
33.81 ms | 403 KiB | 5 Q