3v4l.org

run code in 300+ PHP versions simultaneously
<?php function genRand($length = 10, $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') { $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $chars[rand(0, strlen($chars) - 1)]; } return $randomString; } function populate($count = 10000) { $array = array(); for($i = 0; $i < $count; $i++) { $phone = genRand(10,'0123456789'); $array[$phone] = array( 'phone' => $phone, 'name' => genRand(20), 'age' => genRand(2, '0123456789'), ); } return $array; } $array1 = populate(40000); $array2 = populate(40000); $matched = array_intersect_key($array1, $array2); print_r((!empty($matched) ? 'matched' : 'nope'));

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)
7.1.70.0470.41859.09
7.1.60.0560.30859.19
7.1.50.0570.40458.86
7.1.40.0470.37058.43
7.1.30.0470.35858.64
7.1.20.0430.34558.48
7.1.10.0470.37258.72
7.1.00.1400.35356.42
7.0.200.0470.32658.70
7.0.190.0500.38058.82
7.0.180.0570.37458.06
7.0.170.0500.35358.32
7.0.160.0630.31858.43
7.0.150.0600.34758.23
7.0.140.0470.37758.49
7.0.130.1400.31656.04
7.0.120.2980.33156.32
7.0.111.7810.35654.36
7.0.100.3030.33956.10
7.0.90.1660.34256.15
7.0.80.4680.34855.89
7.0.70.1660.30856.21
7.0.60.3270.33456.05
7.0.50.6570.30756.18
7.0.40.0130.29818.48
7.0.30.0100.35518.51
7.0.20.0000.34218.38
7.0.10.0170.28918.40
7.0.00.0100.35118.29
5.6.300.0330.81985.21
5.6.290.0270.88885.01
5.6.280.0130.75584.95
5.6.270.0230.80885.24
5.6.260.0200.79185.18
5.6.250.0230.85385.38
5.6.240.0200.86885.07
5.6.230.0270.95385.23
5.6.220.0370.83185.29
5.6.210.0330.80985.18
5.6.200.0100.81085.07
5.6.190.0270.79085.18
5.6.180.0300.83185.29
5.6.170.0230.92285.32
5.6.160.0300.81985.34
5.6.150.0300.76385.28
5.6.140.0500.89385.39
5.6.130.0170.86785.16
5.6.120.0130.81685.33
5.6.110.0330.82985.11
5.6.100.0510.86785.23
5.6.90.0230.78985.24
5.6.80.0940.85384.69
5.6.70.0340.79684.72
5.6.60.0230.81684.64
5.6.50.0070.79684.71
5.6.40.0200.75284.70
5.6.30.0360.84284.71
5.6.20.0100.84484.63
5.6.10.0300.79884.54
5.6.00.0300.77284.50
5.5.380.0330.90481.71
5.5.370.0330.88981.68
5.5.360.0300.81081.93
5.5.350.0130.84581.71
5.5.340.0130.80382.29
5.5.330.0230.83682.35
5.5.320.0270.87882.19
5.5.310.0170.94682.36
5.5.300.0030.87782.19
5.5.290.0230.85682.36
5.5.280.0170.86582.44
5.5.270.0330.94582.31
5.5.260.0230.89482.29
5.5.250.0170.89682.24
5.5.240.0270.78981.75
5.5.230.0370.94381.40
5.5.220.0270.81681.80
5.5.210.0430.83281.83
5.5.200.0330.82981.77
5.5.190.0270.83781.79
5.5.180.0230.83881.35
5.5.160.0300.82181.35
5.5.150.0100.78081.73
5.5.140.0270.78981.51
5.5.130.1770.84681.52
5.5.120.0130.79281.69
5.5.110.0170.85981.50
5.5.100.0200.89181.29
5.5.90.0200.85481.64
5.5.80.0400.88681.53
5.5.70.0270.86981.55
5.5.60.0370.87681.63
5.5.50.0200.88781.65
5.5.40.0170.90381.66
5.5.30.0400.83981.62
5.5.20.0270.85181.59
5.5.10.0170.83380.97
5.5.00.0201.04381.66
5.4.450.3090.85783.51
5.4.440.0430.85383.85
5.4.430.0130.98383.71
5.4.420.0270.78883.57
5.4.410.0530.80783.42
5.4.400.0170.85583.31
5.4.390.0300.87483.34
5.4.380.0230.79683.31
5.4.370.0300.81183.24
5.4.360.0300.83783.45
5.4.350.0200.78783.15
5.4.340.0200.81983.23
5.4.320.0300.90683.44
5.4.310.0230.96683.36
5.4.300.0230.83583.16
5.4.290.0640.90183.47
5.4.280.0370.82283.37
5.4.270.0100.84183.15
5.4.260.0300.79583.22
5.4.250.0070.85383.46
5.4.240.0200.85883.20
5.4.230.0400.84483.38
5.4.220.0330.88783.38
5.4.210.0870.93183.40
5.4.200.0370.81683.00
5.4.190.0240.89483.05
5.4.180.0370.81983.29
5.4.170.0300.84582.81
5.4.160.0330.82383.12
5.4.150.0371.00683.18
5.4.140.0200.83880.82
5.4.130.0170.91580.60
5.4.120.0130.87380.78
5.4.110.0300.75381.10
5.4.100.0300.81681.03
5.4.90.0170.84581.11
5.4.80.0130.92680.82
5.4.70.0370.89980.87
5.4.60.0100.77980.82
5.4.50.0300.83480.70
5.4.40.1870.87080.99
5.4.30.0300.85080.71
5.4.20.0230.88080.70
5.4.10.0200.91381.02
5.4.00.0270.84280.48
5.3.290.0070.99078.04
5.3.280.0271.05777.93
5.3.270.0230.88877.88
5.3.260.0230.99077.94
5.3.250.0230.91577.80
5.3.240.0400.90677.92
5.3.230.0100.94878.02
5.3.220.0131.06977.55
5.3.210.0270.98077.88
5.3.200.0170.96377.70
5.3.190.0300.93177.97
5.3.180.0131.04077.55
5.3.170.0130.91677.70
5.3.160.0301.03577.70
5.3.150.0230.97577.96
5.3.140.0331.09977.77
5.3.130.0371.09377.76
5.3.120.0230.88977.75
5.3.110.0300.96377.98
5.3.100.0230.96677.25
5.3.90.0270.92877.39
5.3.80.0230.90877.34
5.3.70.0270.94277.22
5.3.60.0170.96477.34
5.3.50.0231.03077.39
5.3.40.0301.14277.32
5.3.30.0270.98077.12
5.3.20.0430.97876.86
5.3.10.0201.08777.06
5.3.00.0271.06176.64

preferences:
33.99 ms | 401 KiB | 5 Q