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); if (count($count1) === count($count2)) { foreach ($count1 as $key => $value) { echo $key . " and " . $value . "\n"; if ($count2[$key] !== $value) { echo 'not the same!'; } } }

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.0170.00018.36
8.3.50.0100.01021.02
8.3.40.0080.00819.02
8.3.30.0070.00720.27
8.3.20.0080.00020.34
8.3.10.0040.00422.07
8.3.00.0000.00822.29
8.2.180.0060.01216.63
8.2.170.0070.00722.96
8.2.160.0100.00322.13
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00420.75
8.2.110.0120.00920.47
8.2.100.0040.00817.86
8.2.90.0000.00819.04
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0000.00917.90
8.2.50.0000.00718.10
8.2.40.0070.00020.64
8.2.30.0020.00519.32
8.2.20.0030.00617.65
8.2.10.0040.00417.69
8.2.00.0000.00817.85
8.1.280.0170.00025.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00522.80
8.1.230.0030.00720.38
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0000.00817.35
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0030.00618.59
8.1.160.0000.00718.91
8.1.150.0000.00720.24
8.1.140.0080.00017.39
8.1.130.0050.00317.89
8.1.120.0000.00717.38
8.1.110.0050.00317.38
8.1.100.0040.00417.52
8.1.90.0040.00417.38
8.1.80.0030.00317.39
8.1.70.0030.00617.37
8.1.60.0060.00317.62
8.1.50.0000.00717.56
8.1.40.0030.00617.43
8.1.30.0040.00417.66
8.1.20.0080.00017.60
8.1.10.0080.00017.49
8.1.00.0040.00417.57
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.38
8.0.270.0030.00317.24
8.0.260.0030.00316.79
8.0.250.0030.00316.99
8.0.240.0090.00017.01
8.0.230.0000.00716.95
8.0.220.0000.00716.81
8.0.210.0040.00416.84
8.0.200.0070.00016.95
8.0.190.0000.00716.86
8.0.180.0050.00216.82
8.0.170.0040.00417.00
8.0.160.0030.00316.89
8.0.150.0030.00516.84
8.0.140.0000.00716.91
8.0.130.0000.00613.36
8.0.120.0060.00316.85
8.0.110.0030.00516.96
8.0.100.0000.00716.71
8.0.90.0030.00616.97
8.0.80.0120.00316.89
8.0.70.0040.00416.77
8.0.60.0040.00416.86
8.0.50.0000.00716.77
8.0.30.0150.00717.20
8.0.20.0090.00917.40
8.0.10.0000.00816.94
8.0.00.0100.00816.81
7.4.330.0020.00215.00
7.4.320.0000.00816.51
7.4.300.0000.00616.60
7.4.290.0000.00716.63
7.4.280.0080.00016.61
7.4.270.0000.00716.65
7.4.260.0050.00013.36
7.4.250.0000.00716.50
7.4.240.0020.00516.54
7.4.230.0070.00016.62
7.4.220.0030.01416.55
7.4.210.0060.01116.67
7.4.200.0030.00316.36
7.4.190.0070.00016.69
7.4.160.0060.01016.48
7.4.150.0130.01317.40
7.4.140.0120.00517.86
7.4.130.0120.00516.53
7.4.120.0120.00516.39
7.4.110.0070.01016.45
7.4.100.0060.01016.55
7.4.90.0110.01116.54
7.4.80.0060.01319.39
7.4.70.0060.01216.59
7.4.60.0060.01016.46
7.4.50.0000.00816.63
7.4.40.0120.00422.77
7.4.30.0090.00916.53
7.4.00.0060.00814.99
7.3.330.0000.00513.25
7.3.320.0000.00513.38
7.3.310.0040.00416.48
7.3.300.0040.00416.43
7.3.290.0060.00916.44
7.3.280.0070.00816.41
7.3.270.0170.00017.40
7.3.260.0040.01616.36
7.3.250.0090.00816.61
7.3.240.0140.00316.57
7.3.230.0130.00316.39
7.3.210.0120.00916.60
7.3.200.0090.00919.39
7.3.190.0100.00716.35
7.3.180.0100.00616.69
7.3.170.0130.00316.44
7.3.160.0030.01316.61
7.3.120.0040.00714.77
7.3.110.0030.00714.89
7.3.100.0090.00614.79
7.3.90.0000.01414.83
7.3.80.0070.01015.04
7.3.70.0080.00814.70
7.3.60.0060.00314.88
7.3.50.0080.00614.91
7.3.40.0080.00414.79
7.3.30.0130.00014.65
7.3.20.0000.01416.68
7.3.10.0070.01016.61
7.3.00.0070.01016.63
7.2.330.0140.00316.86
7.2.320.0120.01216.79
7.2.310.0070.01516.53
7.2.300.0160.00016.74
7.2.290.0100.00716.85
7.2.250.0100.01015.07
7.2.240.0100.00714.75
7.2.230.0090.00315.04
7.2.220.0030.01015.09
7.2.210.0130.00314.70
7.2.200.0030.01415.07
7.2.190.0040.00815.01
7.2.180.0070.01015.25
7.2.170.0090.00614.96
7.2.60.0060.00916.71
7.2.00.0000.01119.51
7.1.330.0030.01215.80
7.1.320.0070.00715.76
7.1.310.0050.00515.89
7.1.300.0100.00315.73
7.1.290.0030.01015.96
7.1.280.0000.01115.66
7.1.270.0030.00915.72
7.1.260.0080.00615.82
7.1.200.0040.00815.82
7.1.100.0030.00917.85
7.1.70.0030.00517.32
7.1.60.0160.01019.32
7.1.50.0160.00616.88
7.1.00.0030.03322.31
7.0.200.0100.00016.95
7.0.140.0030.07322.18
7.0.60.0070.08320.00
7.0.50.0100.07017.73
7.0.40.0070.06720.24
7.0.30.0170.04020.25
7.0.20.0370.07020.15
7.0.10.0100.07320.19
7.0.00.0100.03720.27
5.6.280.0100.06321.11
5.6.210.0000.04720.51
5.6.200.0100.04318.18
5.6.190.0070.06320.52
5.6.180.0200.03720.49
5.6.170.0170.03720.45
5.6.160.0070.05020.55
5.6.150.0030.04718.16
5.6.140.0070.04018.19
5.6.130.0100.03718.17
5.6.120.0030.05021.05
5.6.110.0130.07721.10
5.6.100.0070.06721.01
5.6.90.0100.08721.11
5.6.80.0070.08720.48
5.5.350.0030.05720.41
5.5.340.0100.05017.99
5.5.330.0070.03720.29
5.5.320.0430.07720.27
5.5.310.0200.04320.30
5.5.300.0070.06718.09
5.5.290.0070.03717.92
5.5.280.0200.07020.96
5.5.270.0070.05320.89
5.5.260.0030.08720.76
5.5.250.0070.06720.58
5.5.240.0330.06720.18
5.4.450.0230.05319.48
5.4.440.0300.06019.57
5.4.430.0230.07319.30
5.4.420.0230.06319.63
5.4.410.0270.05319.14
5.4.400.0270.08718.88
5.4.390.0170.05719.20
5.4.380.0200.05319.13
5.4.370.0130.03718.99
5.4.360.0100.04019.32
5.4.350.0230.07319.06
5.4.340.0300.06718.98
5.4.320.0200.07019.16
5.4.310.0300.06719.06
5.4.300.0230.04719.08
5.4.290.0230.03718.94
5.4.280.0200.07719.09
5.4.270.0170.06319.09
5.4.260.0230.05019.21
5.4.250.0200.07319.21
5.4.240.0230.07719.15
5.4.230.0170.08018.86
5.4.220.0270.06719.08
5.4.210.0230.07318.98
5.4.200.0200.07719.12
5.4.190.0230.07018.80
5.4.180.0200.07019.15
5.4.170.0200.07718.88
5.4.160.0200.04719.06
5.4.150.0200.07318.86
5.4.140.0270.06716.29
5.4.130.0200.06716.37
5.4.120.0200.05316.49
5.4.110.0200.06716.55
5.4.100.0130.06016.51
5.4.90.0270.06716.27
5.4.80.0270.04716.54
5.4.70.0200.05016.14
5.4.60.0430.03016.52
5.4.50.0200.03316.43
5.4.40.0230.07316.38
5.4.30.0270.06016.48
5.4.20.0170.07716.26
5.4.10.0170.04016.34
5.4.00.0200.04015.94
5.3.290.0170.07314.78
5.3.280.0200.06714.82
5.3.270.0270.07314.69
5.3.260.0330.06714.63
5.3.250.0170.04014.63
5.3.240.0330.04714.52
5.3.230.0270.07014.60
5.3.220.0270.07014.58
5.3.210.0230.07314.72
5.3.200.0270.07314.56
5.3.190.0270.05014.64
5.3.180.0170.07314.57
5.3.170.0170.06014.55
5.3.160.0200.07314.63
5.3.150.0100.05714.57
5.3.140.0270.06714.56
5.3.130.0200.05314.54
5.3.120.0230.04714.55
5.3.110.0230.06014.47
5.3.100.0230.06314.26
5.3.90.0200.06013.94
5.3.80.0230.05714.14
5.3.70.0270.07313.91
5.3.60.0270.07014.23
5.3.50.0200.07313.92
5.3.40.0270.04313.98
5.3.30.0230.05313.91
5.3.20.0170.05013.62
5.3.10.0170.04713.81
5.3.00.0170.03313.66
5.2.170.0330.04711.86
5.2.160.0270.04011.86
5.2.150.0230.05711.86
5.2.140.0100.04311.86
5.2.130.0170.04711.86
5.2.120.0170.04011.86
5.2.110.0100.03011.86
5.2.100.0100.03311.86
5.2.90.0130.03311.86
5.2.80.0130.03311.86
5.2.70.0230.02711.86
5.2.60.0130.03311.86
5.2.50.0100.03011.86
5.2.40.0100.02711.86
5.2.30.0130.02311.86
5.2.20.0130.02311.86
5.2.10.0100.03011.86
5.2.00.0030.03311.86
5.1.60.0130.02011.86
5.1.50.0100.02311.86
5.1.40.0100.02311.86
5.1.30.0100.02311.86
5.1.20.0070.02711.86
5.1.10.0070.02711.86
5.1.00.0100.02311.86
5.0.50.0030.02011.86
5.0.40.0030.02011.86
5.0.30.0070.03011.86
5.0.20.0030.02311.86
5.0.10.0030.02011.86
5.0.00.0030.03011.86
4.4.90.0070.01311.86
4.4.80.0100.01311.86
4.4.70.0000.02011.86
4.4.60.0100.01711.86
4.4.50.0030.01711.86
4.4.40.0030.02711.86
4.4.30.0030.01711.86
4.4.20.0070.01311.86
4.4.10.0030.01711.86
4.4.00.0030.02711.86
4.3.110.0070.01311.86
4.3.100.0000.01711.86
4.3.90.0000.01711.86
4.3.80.0070.02311.86
4.3.70.0030.01711.86
4.3.60.0030.01311.86
4.3.50.0070.01311.86
4.3.40.0000.02711.86
4.3.30.0030.01311.86
4.3.20.0030.01711.86
4.3.10.0030.01311.86
4.3.00.0000.01711.86

preferences:
45.29 ms | 401 KiB | 5 Q