3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check($existing, $new) { $existingArray = explode(",", $existing); $newArray = explode(",", $new); if (count($newArray) !== count($existingArray)) return false; foreach ($newArray as $n) { if (!in_array($n, $existingArray)) return false; } return true; } $existingRecords = "1,3,4,6,5"; $newRecords = "6,4,3,1,5"; var_dump(check($existingRecords, $newRecords));

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.5.10.0130.00616.69
8.5.00.0100.01020.02
8.4.150.0030.00014.05
8.4.140.0170.00617.37
8.4.130.0110.00917.77
8.4.120.0070.00220.18
8.4.110.0140.00618.57
8.4.100.0020.00817.59
8.4.90.0100.01122.45
8.4.80.0120.00919.51
8.4.70.0110.01118.00
8.4.60.0140.00819.15
8.4.50.0140.00720.51
8.4.40.0170.00317.64
8.4.30.0130.00719.37
8.4.20.0030.00619.64
8.4.10.0090.00019.52
8.3.280.0110.00920.06
8.3.270.0130.00616.76
8.3.260.0080.00716.77
8.3.250.0110.00518.80
8.3.240.0110.00816.32
8.3.230.0110.00816.64
8.3.220.0040.00318.90
8.3.210.0100.00816.59
8.3.200.0040.00616.66
8.3.190.0150.00517.07
8.3.180.0130.00516.48
8.3.170.0090.00917.28
8.3.160.0150.00419.96
8.3.150.0070.01319.02
8.3.140.0060.00317.36
8.3.130.0110.00418.16
8.3.120.0040.00418.74
8.3.110.0030.00620.94
8.3.100.0000.00818.47
8.3.90.0050.00326.77
8.3.80.0060.00317.97
8.3.70.0040.01116.48
8.3.60.0110.00416.50
8.3.50.0100.00818.33
8.3.40.0070.01118.46
8.3.30.0120.00318.49
8.3.20.0080.00020.16
8.3.10.0080.00021.97
8.3.00.0090.00023.71
8.2.290.0110.00820.55
8.2.280.0100.00818.39
8.2.270.0130.00617.15
8.2.260.0120.00618.08
8.2.250.0060.00318.43
8.2.240.0030.00618.95
8.2.230.0040.00422.58
8.2.220.0030.00724.06
8.2.210.0040.00426.77
8.2.200.0000.01118.16
8.2.190.0090.00916.58
8.2.180.0150.00316.63
8.2.170.0090.00622.96
8.2.160.0080.00820.38
8.2.150.0070.00024.18
8.2.140.0020.00524.66
8.2.130.0040.00426.16
8.2.120.0050.00320.94
8.2.110.0040.00421.03
8.2.100.0070.00417.78
8.2.90.0050.00317.71
8.2.80.0050.00318.91
8.2.70.0040.00417.47
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0000.00720.60
8.2.30.0030.00619.27
8.2.20.0040.00418.04
8.2.10.0050.00218.16
8.2.00.0030.00518.00
8.1.330.0110.00723.83
8.1.320.0110.00716.00
8.1.310.0040.00418.53
8.1.300.0100.01017.60
8.1.290.0030.00630.84
8.1.280.0160.01025.92
8.1.270.0040.00420.40
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0080.00322.03
8.1.230.0090.00320.89
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0030.00617.22
8.1.180.0050.00218.10
8.1.170.0040.00418.46
8.1.160.0000.00718.89
8.1.150.0040.00420.14
8.1.140.0000.00717.34
8.1.130.0040.00419.00
8.1.120.0070.00017.49
8.1.110.0040.00417.46
8.1.100.0030.00617.45
8.1.90.0040.00417.48
8.1.80.0050.00217.43
8.1.70.0030.00517.46
8.1.60.0050.00317.46
8.1.50.0050.00317.42
8.1.40.0000.00717.57
8.1.30.0000.00817.60
8.1.20.0000.00817.47
8.1.10.0050.00217.38
8.1.00.0080.00017.32
8.0.300.0030.00320.03
8.0.290.0040.00416.75
8.0.280.0070.00018.31
8.0.270.0030.00317.28
8.0.260.0030.00318.43
8.0.250.0080.00016.95
8.0.240.0040.00416.90
8.0.230.0040.00416.93
8.0.220.0000.00816.80
8.0.210.0000.00716.83
8.0.200.0000.00616.92
8.0.190.0000.00816.96
8.0.180.0040.00416.90
8.0.170.0040.00416.83
8.0.160.0030.00316.88
8.0.150.0000.00816.89
8.0.140.0040.00416.77
8.0.130.0050.00013.32
8.0.120.0000.00716.88
8.0.110.0000.00816.82
8.0.100.0040.00416.85
8.0.90.0030.00516.81
8.0.80.0040.01116.84
8.0.70.0000.00816.91
8.0.60.0070.00016.91
8.0.50.0030.00516.70
8.0.30.0100.00717.04
8.0.20.0100.00817.40
8.0.10.0000.00716.86
8.0.00.0030.01316.78
7.4.330.0030.00315.55
7.4.320.0000.00716.50
7.4.300.0080.00016.50
7.4.290.0000.00816.50
7.4.280.0030.00416.50
7.4.270.0000.00716.47
7.4.260.0000.00816.59
7.4.250.0030.00316.47
7.4.240.0040.00416.58
7.4.230.0030.00316.69
7.4.220.0130.00616.47
7.4.210.0090.00916.69
7.4.200.0080.00016.61
7.4.160.0140.00516.45
7.4.150.0110.01517.40
7.4.140.0130.00917.86
7.4.130.0120.00616.54
7.4.120.0100.00716.58
7.4.110.0140.00416.53
7.4.100.0070.01016.39
7.4.90.0070.01016.58
7.4.80.0150.00319.39
7.4.70.0100.01316.56
7.4.60.0070.00716.34
7.4.50.0030.01216.32
7.4.40.0110.00716.27
7.4.30.0060.01016.55
7.4.10.0040.01415.01
7.4.00.0060.01015.09
7.3.330.0020.00213.15
7.3.320.0000.00513.29
7.3.310.0000.00716.14
7.3.300.0040.00416.30
7.3.290.0040.01416.35
7.3.280.0090.00816.29
7.3.270.0120.00617.40
7.3.260.0110.00916.47
7.3.250.0100.00816.31
7.3.240.0120.00516.49
7.3.230.0070.01016.62
7.3.210.0150.00316.24
7.3.200.0110.00616.30
7.3.190.0120.00616.67
7.3.180.0060.01216.27
7.3.170.0100.00716.55
7.3.160.0030.01216.49
7.3.130.0060.01315.11
7.3.120.0030.01314.82
7.3.110.0060.01315.14
7.3.100.0030.01214.86
7.3.90.0060.01315.02
7.3.80.0040.00714.81
7.3.70.0070.00714.86
7.3.60.0040.01114.74
7.3.50.0060.00914.66
7.3.40.0060.00614.92
7.3.30.0030.01314.68
7.3.20.0040.01116.55
7.3.10.0030.00616.72
7.3.00.0060.01216.63
7.2.330.0120.00916.93
7.2.320.0070.01016.53
7.2.310.0060.01016.40
7.2.300.0130.00916.69
7.2.290.0140.00316.88
7.2.260.0020.01015.03
7.2.250.0060.01215.07
7.2.240.0040.01115.21
7.2.230.0060.00914.80
7.2.220.0100.00715.18
7.2.210.0060.01015.03
7.2.200.0090.00614.98
7.2.190.0030.00914.86
7.2.180.0130.00014.95
7.2.170.0030.00914.93
7.2.160.0100.00314.73
7.2.150.0030.01016.98
7.2.140.0090.00616.97
7.2.130.0070.00717.08
7.2.120.0000.01416.77
7.2.110.0070.00916.80
7.2.100.0090.00616.71
7.2.90.0060.00616.99
7.2.80.0030.01017.05
7.2.70.0040.00717.13
7.2.60.0040.01117.02
7.2.50.0000.00916.87
7.2.40.0030.01017.07
7.2.30.0090.00616.80
7.2.20.0030.00716.79
7.2.10.0030.01016.75
7.2.00.0090.00317.14
7.1.330.0090.00616.02
7.1.320.0040.01515.54
7.1.310.0100.00615.83
7.1.300.0060.00615.75
7.1.290.0030.01015.73
7.1.280.0070.00715.72
7.1.270.0080.00415.94
7.1.260.0030.00915.71
7.1.250.0030.01515.84
7.1.240.0070.00715.70
7.1.230.0060.00615.58
7.1.220.0110.00315.80
7.1.210.0030.00915.91
7.1.200.0020.01015.69
7.1.190.0000.01415.80
7.1.180.0030.00515.71
7.1.170.0030.00715.91
7.1.160.0070.00715.71
7.1.150.0070.00315.76
7.1.140.0000.01115.59
7.1.130.0130.00015.60
7.1.120.0120.00615.63
7.1.110.0030.00715.61
7.1.100.0030.01615.91
7.1.90.1390.00816.08
7.1.80.1210.00915.81
7.1.70.1460.01015.57
7.1.60.1210.01124.51
7.1.50.1310.00924.40
7.1.40.1280.00924.01
7.1.30.1270.01324.24
7.1.20.1390.00824.16
7.1.10.1280.00615.24
7.1.00.1520.01115.32
7.0.330.0030.00815.14
7.0.320.0040.00715.29
7.0.310.0060.00615.36
7.0.300.0090.00315.57
7.0.290.0000.00715.36
7.0.280.0070.00315.23
7.0.270.0070.00315.54
7.0.260.0110.00415.41
7.0.250.0100.00315.48
7.0.240.1070.00915.63
7.0.230.1290.01015.49
7.0.220.1270.00515.62
7.0.210.1380.00815.07
7.0.200.1340.00815.09
7.0.190.1210.01115.15
7.0.180.1520.00714.77
7.0.170.1250.01014.95
7.0.160.1380.00514.94
7.0.150.1240.01114.94
7.0.140.1250.00814.97
7.0.130.1170.01014.84
7.0.120.1230.01014.93
7.0.110.1240.00815.05
7.0.100.1250.00814.84
7.0.90.1220.01214.84
7.0.80.1120.01215.05
7.0.70.1220.00715.12
7.0.60.1210.00514.97
7.0.50.1260.00614.94
7.0.40.1110.01314.00
7.0.30.1340.01314.03
7.0.20.1320.00613.89
7.0.10.1270.00814.13
7.0.00.1240.01014.11
5.6.400.0110.00314.29
5.6.390.0040.00814.04
5.6.380.0110.00014.21
5.6.370.0040.00414.36
5.6.360.0000.01214.35
5.6.350.0070.00314.07
5.6.340.0000.01214.34
5.6.330.0070.00314.20
5.6.320.0070.00314.43
5.6.310.0000.01414.32
5.6.300.0070.00714.54
5.6.290.0060.00914.48
5.6.280.0090.00614.23
5.6.270.0030.00914.01
5.6.260.0030.01013.94
5.6.250.0070.00714.48
5.6.240.0000.01414.26
5.6.230.0060.00914.57
5.6.220.0000.00914.28
5.6.210.0040.00414.34
5.6.200.0070.00714.24
5.6.190.0000.01414.17
5.6.180.0110.00414.08
5.6.170.0060.00914.49
5.6.160.0050.00514.41
5.6.150.0070.01114.14
5.6.140.0060.00314.34
5.6.130.0070.00714.43
5.6.120.0030.00614.04
5.6.110.0000.01314.17
5.6.100.0120.00314.29
5.6.90.0090.00314.31
5.6.80.0030.01013.91
5.6.70.0000.01314.13
5.6.60.0040.01114.16
5.6.50.0060.00314.20
5.6.40.0050.00514.00
5.6.30.0060.00614.18
5.6.20.0000.01414.48
5.6.10.0000.00914.04
5.6.00.0080.00013.95

preferences:
22.36 ms | 403 KiB | 5 Q