3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new StdClass(); $b = new StdClass(); $array1 = array($a, $a, $b); $array2 = array($a, $b, $b); function countHashes ($array) { $count = array(); foreach ($array as $val) { $hash = spl_object_hash($val); if (! isset($count[$hash])) { $count[$hash] = 0; } } $count[$hash]++; return $count; }; $count1 = countHashes($array1); $count2 = countHashes($array2); var_dump($count1); var_dump($count2);

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.0140.00718.56
8.3.50.0230.00721.14
8.3.40.0060.00918.71
8.3.30.0070.00720.38
8.3.20.0040.00420.37
8.3.10.0060.00322.09
8.3.00.0000.00822.45
8.2.180.0070.00716.38
8.2.170.0060.00922.96
8.2.160.0070.00722.13
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.56
8.2.110.0060.00322.20
8.2.100.0080.00417.66
8.2.90.0040.00419.25
8.2.80.0040.00419.06
8.2.70.0090.00017.50
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0000.00818.03
8.2.30.0070.00019.53
8.2.20.0000.00817.71
8.2.10.0040.00417.66
8.2.00.0040.00417.65
8.1.280.0070.00725.92
8.1.270.0050.00223.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0040.00423.84
8.1.230.0040.00818.93
8.1.220.0020.00517.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0030.00517.65
8.1.180.0090.00019.13
8.1.170.0050.00318.57
8.1.160.0070.00018.89
8.1.150.0000.00818.55
8.1.140.0050.00217.44
8.1.130.0040.00417.70
8.1.120.0000.00717.40
8.1.110.0050.00217.44
8.1.100.0080.00017.36
8.1.90.0000.00717.50
8.1.80.0050.00217.45
8.1.70.0000.00717.34
8.1.60.0030.00617.55
8.1.50.0000.00717.54
8.1.40.0000.00717.49
8.1.30.0080.00017.66
8.1.20.0000.00817.72
8.1.10.0040.00417.62
8.1.00.0040.00417.50
8.0.300.0060.00318.77
8.0.290.0070.00017.18
8.0.280.0000.00718.52
8.0.270.0030.00516.73
8.0.260.0070.00016.82
8.0.250.0000.00716.98
8.0.240.0060.00516.85
8.0.230.0000.00716.97
8.0.220.0000.00716.94
8.0.210.0000.00716.78
8.0.200.0060.00016.84
8.0.190.0000.00716.86
8.0.180.0070.00016.87
8.0.170.0080.00016.92
8.0.160.0030.00416.92
8.0.150.0070.00316.94
8.0.140.0000.00816.91
8.0.130.0050.00013.32
8.0.120.0000.00816.86
8.0.110.0030.00516.92
8.0.100.0040.00416.85
8.0.90.0040.00416.77
8.0.80.0120.00316.88
8.0.70.0050.00216.94
8.0.60.0000.00716.77
8.0.50.0000.00716.76
8.0.30.0090.00917.21
8.0.20.0070.01117.40
8.0.10.0000.00717.06
8.0.00.0110.01116.59
7.4.330.0000.00515.00
7.4.320.0060.00316.51
7.4.300.0070.00016.65
7.4.290.0000.00616.58
7.4.280.0030.00316.60
7.4.270.0030.00316.52
7.4.260.0000.00513.27
7.4.250.0070.00016.51
7.4.240.0070.00016.47
7.4.230.0000.00716.36
7.4.220.0170.01016.70
7.4.210.0100.00916.60
7.4.200.0040.00416.40
7.4.190.0030.00316.56
7.4.160.0160.01016.55
7.4.150.0100.00717.40
7.4.140.0140.00417.86
7.4.130.0120.00516.43
7.4.120.0080.01016.48
7.4.110.0180.00516.48
7.4.100.0080.00916.63
7.4.90.0060.01416.41
7.4.80.0060.01519.39
7.4.70.0120.00916.34
7.4.60.0100.00716.46
7.4.50.0000.00916.25
7.4.40.0040.01122.77
7.4.30.0160.00716.43
7.4.00.0110.00415.16
7.3.330.0000.00613.34
7.3.320.0000.00513.17
7.3.310.0020.00516.38
7.3.300.0000.00716.38
7.3.290.0070.00716.37
7.3.280.0030.01316.36
7.3.270.0030.01317.40
7.3.260.0110.00616.53
7.3.250.0110.00716.35
7.3.240.0120.00916.66
7.3.230.0060.01216.39
7.3.210.0090.00616.54
7.3.200.0090.01019.39
7.3.190.0120.00916.62
7.3.180.0140.00716.50
7.3.170.0090.00616.54
7.3.160.0120.00416.56
7.3.120.0040.01114.88
7.3.10.0060.00316.66
7.3.00.0220.00715.97
7.2.330.0130.00316.87
7.2.320.0130.01016.66
7.2.310.0070.01016.77
7.2.300.0100.01316.74
7.2.290.0210.00016.86
7.2.130.0230.00816.39
7.2.120.0200.00716.18
7.2.110.0200.00616.14
7.2.100.0160.00616.26
7.2.90.0520.00616.26
7.2.80.0160.00716.36
7.2.70.0240.00416.26
7.2.60.0210.00516.63
7.2.50.0180.00716.15
7.2.40.0200.00716.36
7.2.30.0220.00716.29
7.2.20.0150.00716.25
7.2.10.0220.00716.34
7.2.00.0150.00816.35
7.1.250.0260.00715.16
7.1.240.0400.00214.82
7.1.230.0330.00814.79
7.1.220.0310.00814.93
7.1.210.0290.00715.03
7.1.200.0170.00515.12
7.1.190.0360.00514.86
7.1.180.0250.01114.78
7.1.170.0300.00714.88
7.1.160.0330.00714.89
7.1.150.0360.00314.86
7.1.140.0260.00714.84
7.1.130.0200.00914.85
7.1.120.0340.00314.85
7.1.110.0340.00414.82
7.1.100.0170.00616.02
7.1.90.0320.00714.88
7.1.80.0300.00614.76
7.1.70.0150.00415.69
7.1.60.0110.01516.22
7.1.50.0220.00615.68
7.1.40.0250.01014.89
7.1.30.0280.00614.79
7.1.20.0330.00714.89
7.1.10.0270.00214.66
7.1.00.0170.01717.42
7.0.330.0270.01014.48
7.0.320.0220.01014.37
7.0.310.0320.00814.46
7.0.300.0350.00514.48
7.0.290.0240.01114.29
7.0.280.0300.00614.29
7.0.270.0290.00214.49
7.0.260.0190.01114.49
7.0.250.0250.00714.47
7.0.240.0230.00614.55
7.0.230.0140.01114.47
7.0.220.0130.01014.40
7.0.210.0060.00814.29
7.0.200.0200.00715.25
7.0.190.0250.00514.36
7.0.180.0220.00614.58
7.0.170.0330.00514.63
7.0.160.0140.01214.57
7.0.150.0230.00614.39
7.0.140.0190.02717.03
7.0.130.0240.00614.46
7.0.120.0420.00814.48
7.0.110.0230.00514.58
7.0.100.0260.00614.51
7.0.90.0230.00814.43
7.0.80.0220.03016.25
7.0.70.0190.03316.21
7.0.60.0270.02916.26
7.0.50.0100.02616.43
7.0.40.0210.02315.71
7.0.30.0090.03115.73
7.0.20.0140.01615.68
7.0.10.0240.01515.72
7.0.00.0100.02415.71
5.6.380.0060.01014.54
5.6.370.0080.00814.19
5.6.360.0100.00514.29
5.6.350.0120.00514.35
5.6.340.0070.00614.30
5.6.330.0130.00014.33
5.6.320.0060.00914.48
5.6.310.0060.00814.35
5.6.300.0120.00314.39
5.6.290.0060.01014.36
5.6.280.0060.03116.60
5.6.270.0060.01014.73
5.6.260.0070.00814.28
5.6.250.0070.00914.42
5.6.240.0100.00314.54
5.6.230.0070.03316.54
5.6.220.0050.03616.52
5.6.210.0090.02116.36
5.6.200.0100.03116.55
5.6.190.0080.02616.59
5.6.180.0090.01816.60
5.6.170.0070.01816.38
5.6.160.0050.02416.48
5.6.150.0050.02016.54
5.6.140.0040.02116.48
5.6.130.0060.02016.66
5.6.120.0100.01616.67
5.6.110.0090.01716.55
5.6.100.0090.01816.59
5.6.90.0100.01716.82
5.6.80.0100.01416.28
5.6.70.0080.01916.38
5.6.60.0070.01616.31
5.6.50.0030.02216.47
5.6.40.0080.01816.30
5.6.30.0080.01716.35
5.6.20.0060.01616.34
5.6.10.0090.01716.32
5.6.00.0100.01716.29
5.5.380.0030.00911.61
5.5.370.0060.03114.56
5.5.360.0040.03214.42
5.5.350.0110.02914.50
5.5.340.0050.01914.65
5.5.330.0080.01514.61
5.5.320.0060.01614.64
5.5.310.0060.03114.54
5.5.300.0060.02214.61
5.5.290.0030.02414.63
5.5.280.0070.01814.60
5.5.270.0050.02014.65
5.5.260.0090.01614.44
5.5.250.0040.02014.45
5.5.240.0060.01714.37
5.5.230.0010.01814.38
5.5.220.0060.01414.22
5.5.210.0060.01614.29
5.5.200.0070.01314.34
5.5.190.0070.01414.24
5.5.180.0060.01714.36
5.5.170.0080.00411.48
5.5.160.0060.01614.32
5.5.150.0060.01414.33
5.5.140.0020.01914.29
5.5.130.0050.02114.42
5.5.120.0060.01514.31
5.5.110.0030.03214.34
5.5.100.0090.01214.33
5.5.90.0080.02814.27
5.5.80.0120.02314.30
5.5.70.0070.01714.27
5.5.60.0060.03014.36
5.5.50.0070.02714.34
5.5.40.0070.01914.30
5.5.30.0080.02014.23
5.5.20.0030.03214.41
5.5.10.0100.02414.23
5.5.00.0090.02514.22
5.4.450.0050.02014.15
5.4.440.0080.01514.13
5.4.430.0050.01914.05
5.4.420.0020.01914.17
5.4.410.0070.01714.05
5.4.400.0040.01713.89
5.4.390.0050.01613.98
5.4.380.0100.01213.94
5.4.370.0050.01414.06
5.4.360.0060.01613.98
5.4.350.0050.01414.01
5.4.340.0050.01513.76
5.4.330.0050.00911.43
5.4.320.0080.01313.77
5.4.310.0080.01514.01
5.4.300.0060.01213.88
5.4.290.0050.01513.99
5.4.280.0040.01813.87
5.4.270.0060.01413.94
5.4.260.0060.01413.75
5.4.250.0050.01513.82
5.4.240.0070.02014.02
5.4.230.0060.01614.03
5.4.220.0110.01213.95
5.4.210.0110.02313.98
5.4.200.0070.02713.92
5.4.190.0080.02513.89
5.4.180.0060.03013.89
5.4.170.0070.02814.05
5.4.160.0090.02713.93
5.4.150.0060.02713.77
5.4.140.0050.02812.98
5.4.130.0070.02813.09
5.4.120.0060.02712.99
5.4.110.0030.03013.09
5.4.100.0050.02813.07
5.4.90.0060.03112.90
5.4.80.0050.03013.15
5.4.70.0060.01712.97
5.4.60.0050.02813.03
5.4.50.0050.02812.99
5.4.40.0080.01212.99
5.4.30.0080.01113.09
5.4.20.0060.01413.07
5.4.10.0040.01413.05
5.4.00.0080.01112.76
5.3.290.0080.01012.36
5.3.280.0040.01612.16
5.3.270.0080.01712.28
5.3.260.0050.01812.28
5.3.250.0090.01312.21
5.3.240.0050.02912.24
5.3.230.0060.01512.23
5.3.220.0060.02612.26
5.3.210.0070.02812.14
5.3.200.0050.01912.23
5.3.190.0060.02112.25
5.3.180.0070.02212.31
5.3.170.0030.01512.29
5.3.160.0080.02912.26
5.3.150.0030.02812.24
5.3.140.0090.02512.28
5.3.130.0060.01312.22
5.3.120.0080.02612.29
5.3.110.0050.03012.19
5.3.100.0040.01612.05
5.3.90.0040.01612.08
5.3.80.0080.01212.00
5.3.70.0100.00911.95
5.3.60.0060.02312.06
5.3.50.0020.01712.06
5.3.40.0070.02711.96
5.3.30.0040.02812.07
5.3.20.0070.02911.91
5.3.10.0080.01411.87
5.3.00.0030.01611.82
5.2.170.0050.02511.46
5.2.160.0060.02211.48
5.2.150.0060.01511.47
5.2.140.0040.01311.46
5.2.130.0050.02311.47
5.2.120.0050.02311.38
5.2.110.0050.01211.47
5.2.100.0030.01211.38
5.2.90.0050.01011.45
5.2.80.0050.01011.43
5.2.70.0030.01311.42
5.2.60.0030.01311.31
5.2.50.0030.01511.33
5.2.40.0050.01211.45
5.2.30.0040.01311.33
5.2.20.0040.02411.41
5.2.10.0060.02211.31
5.2.00.0030.01611.35
5.1.60.0060.01811.28
5.1.50.0040.02011.28
5.1.40.0040.02211.28
5.1.30.0070.01911.28
5.1.20.0040.01311.28
5.1.10.0050.00811.28
5.1.00.0090.01711.28
5.0.50.0000.01911.28
5.0.40.0020.00911.28
5.0.30.0020.01111.28
5.0.20.0030.00711.28
5.0.10.0020.00811.28
5.0.00.0040.02311.28
4.4.90.0010.01511.28
4.4.80.0040.00611.28
4.4.70.0030.00811.28
4.4.60.0040.00711.28
4.4.50.0040.00811.28
4.4.40.0030.02011.28
4.4.30.0030.00511.28
4.4.20.0020.00811.28
4.4.10.0000.00811.28
4.4.00.0010.01211.28
4.3.110.0000.00811.28
4.3.100.0020.00711.28
4.3.90.0040.00511.28
4.3.80.0010.00911.28
4.3.70.0040.00511.28
4.3.60.0030.00911.28
4.3.50.0010.01311.28
4.3.40.0010.01211.28
4.3.30.0030.00911.28
4.3.20.0020.01311.28
4.3.10.0030.01211.28
4.3.00.0030.01011.28

preferences:
37.37 ms | 401 KiB | 5 Q