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); $match = FALSE; foreach($array1 as $key => $value) { if(isset($array2[$key])) { $match = TRUE; break; } } print_r(($match ? '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.4.10.0300.41356.24
7.4.00.0330.42056.28
7.3.130.0300.42256.48
7.3.120.0170.44656.21
7.3.110.0330.28255.86
7.3.100.0100.28156.32
7.3.90.0170.29056.34
7.3.80.0270.38856.59
7.3.70.0270.35656.26
7.3.60.0170.27856.01
7.3.50.0230.28756.25
7.3.40.0270.27556.19
7.3.30.0300.31256.11
7.3.20.0200.25658.54
7.3.10.0330.39458.77
7.3.00.0130.24758.47
7.2.260.0400.30956.32
7.2.250.0310.32956.39
7.2.240.0130.41755.96
7.2.230.0330.34056.36
7.2.220.0130.27356.13
7.2.210.0200.31256.21
7.2.200.0200.46956.30
7.2.190.0170.45656.24
7.2.180.0300.45156.25
7.2.170.0200.37456.24
7.2.160.0200.37956.32
7.2.150.0330.42858.91
7.2.140.0230.33158.79
7.2.130.0100.43958.77
7.2.120.0200.46159.17
7.2.110.0230.38058.85
7.2.100.0130.39158.95
7.2.90.0370.39959.02
7.2.80.0070.43159.15
7.2.70.0300.44359.25
7.2.60.0170.31359.17
7.2.50.0170.43259.24
7.2.40.0100.34159.02
7.2.30.0130.47159.22
7.2.20.0330.30359.20
7.2.10.0300.31658.98
7.2.00.0330.39660.39
7.1.330.0200.67858.10
7.1.320.0170.77058.11
7.1.310.0200.89957.95
7.1.300.0170.69757.58
7.1.290.0230.63257.80
7.1.280.0170.81857.86
7.1.270.0070.69458.02
7.1.260.0200.75858.00
7.1.250.0070.78158.01
7.1.240.0270.88457.96
7.1.230.0270.88457.87
7.1.220.0100.67858.16
7.1.210.0070.90958.11
7.1.200.0200.93857.75
7.1.190.0200.66758.18
7.1.180.0270.78358.03
7.1.170.0070.89858.12
7.1.160.0200.82158.09
7.1.150.0230.76458.05
7.1.140.0270.87958.02
7.1.130.0200.64557.88
7.1.120.0100.81358.13
7.1.110.2790.88857.87
7.1.100.0860.84858.11
7.1.90.0070.85257.70
7.1.80.0190.62457.88
7.1.70.0380.53558.60
7.1.60.0210.51558.58
7.1.50.0250.47658.48
7.1.40.0190.81658.04
7.1.30.0290.76758.14
7.1.20.0320.68557.72
7.1.10.0180.69257.82
7.1.00.0150.59861.15
7.0.330.0300.69857.71
7.0.320.0200.92757.64
7.0.310.0100.91857.60
7.0.300.0200.92957.61
7.0.290.0170.82857.44
7.0.280.0230.78357.62
7.0.270.0100.69757.55
7.0.260.0230.90957.63
7.0.250.0130.90157.78
7.0.240.2110.69257.52
7.0.230.0360.63057.69
7.0.220.0180.62657.67
7.0.210.0200.67357.71
7.0.200.0150.46958.41
7.0.190.0430.73657.66
7.0.180.0260.66857.49
7.0.170.0300.69557.47
7.0.160.0300.73757.57
7.0.150.0300.75757.64
7.0.140.0180.53260.88
7.0.130.0310.61957.49
7.0.120.0130.66657.47
7.0.110.0220.61557.73
7.0.100.0100.75257.79
7.0.90.0200.68457.74
7.0.80.0270.78357.61
7.0.70.0220.91857.67
7.0.60.0280.52759.33
7.0.50.0110.52258.36
7.0.40.0210.52220.19
7.0.30.0400.56720.35
7.0.20.0280.51620.32
7.0.10.0170.51520.29
7.0.00.0190.49520.15
5.6.400.0471.94278.95
5.6.390.0501.54879.24
5.6.380.0271.75179.29
5.6.370.0431.86779.27
5.6.360.0431.81378.92
5.6.350.0432.01279.29
5.6.340.0271.91478.74
5.6.330.0601.75179.02
5.6.320.0371.54579.33
5.6.310.0631.43679.03
5.6.300.0441.14763.69
5.6.290.0171.30374.29
5.6.280.0321.24682.57
5.6.270.0491.23568.69
5.6.260.0431.34469.97
5.6.250.0481.35766.45
5.6.240.0271.54065.00
5.6.230.0531.70179.12
5.6.220.0531.75879.23
5.6.210.0751.16782.08
5.6.200.0351.26180.92
5.6.190.0361.14281.78
5.6.180.0501.18381.97
5.6.170.0391.10381.79
5.6.160.0221.22182.07
5.6.150.0251.21880.74
5.6.140.0321.28780.90
5.6.130.0371.25880.91
5.6.120.0391.34782.35
5.6.110.0331.28881.04
5.6.100.0331.21782.25
5.6.90.0501.29282.27
5.6.80.0311.35581.44
5.6.70.0381.49081.95
5.6.60.0461.68079.33
5.6.50.0501.77179.11
5.6.40.0641.61178.96
5.6.30.0331.70579.07
5.6.20.0361.82678.91
5.6.10.0561.91078.93
5.6.00.0321.47178.98
5.5.380.0471.72279.02
5.5.370.0271.83179.14
5.5.360.0431.55179.05
5.5.350.0411.24581.95
5.5.340.0261.19180.67
5.5.330.0401.17481.83
5.5.320.0551.22881.89
5.5.310.0411.30981.90
5.5.300.0341.30480.87
5.5.290.0461.33080.78
5.5.280.0481.28482.33
5.5.270.0301.43881.58
5.5.260.0431.25182.32
5.5.250.0361.28782.15
5.5.240.0371.18981.74
5.5.230.0431.49078.87
5.5.220.0301.54178.71
5.5.210.0331.65979.12
5.5.200.0931.82279.07
5.5.190.0531.70878.67
5.5.180.0461.86579.02
5.5.170.0431.65079.14
5.5.160.0372.01079.02
5.5.150.0571.66378.90
5.5.140.0231.93778.70
5.5.130.0231.87779.01
5.5.120.0391.84579.04
5.5.110.0491.67679.09
5.5.100.0431.72178.37
5.5.90.0452.01579.04
5.5.80.0571.78679.02
5.5.70.0621.83778.85
5.5.60.0471.55879.06
5.5.50.0371.74878.93
5.5.40.0361.85279.11
5.5.30.0361.71478.47
5.5.20.0521.90378.86
5.5.10.0572.01078.92
5.5.00.0321.91678.71
5.4.450.0591.39676.89
5.4.440.0331.49779.95
5.4.430.0571.41974.36
5.4.420.0691.47579.91
5.4.410.0771.39379.61
5.4.400.0781.37079.62
5.4.390.0421.64779.77
5.4.380.0421.66979.29
5.4.370.0621.68679.59
5.4.360.0661.59579.58
5.4.350.0571.57279.53
5.4.340.0561.60579.52
5.4.330.0271.63475.77
5.4.320.0471.37876.39
5.4.310.0361.46776.51
5.4.300.0281.48976.34
5.4.290.0441.47676.45
5.4.280.0501.41676.41
5.4.270.0511.41476.29
5.4.260.0391.50976.34
5.4.250.0331.40276.49
5.4.240.0481.48776.46
5.4.230.0451.53476.33
5.4.220.0431.49076.17
5.4.210.0471.57476.36
5.4.200.0541.81776.43
5.4.190.0501.63476.31
5.4.180.0491.66476.30
5.4.170.0541.33476.18
5.4.160.0441.52976.43
5.4.150.0531.39876.38
5.4.140.0451.66776.24
5.4.130.0371.46476.35
5.4.120.0511.42276.32
5.4.110.0491.60776.18
5.4.100.0381.80476.19
5.4.90.0511.59276.12
5.4.80.0391.54375.99
5.4.70.0331.67576.19
5.4.60.0341.56576.26
5.4.50.0441.87476.12
5.4.40.0481.45976.33
5.4.30.0401.52576.17
5.4.20.0381.53776.15
5.4.10.0351.34576.05
5.4.00.0461.41576.00
5.3.290.0331.63875.03
5.3.280.0361.77174.89
5.3.270.0421.70274.96
5.3.260.0492.02574.94
5.3.250.0491.87074.94
5.3.240.0581.79474.77
5.3.230.0581.60474.78
5.3.220.0521.99274.44
5.3.210.0481.92174.88
5.3.200.0471.66574.86
5.3.190.0401.56675.16
5.3.180.0491.62174.95
5.3.170.0471.79474.71
5.3.160.0511.65774.77
5.3.150.0431.54074.94
5.3.140.0451.64274.76
5.3.130.0291.63274.91
5.3.120.0361.75974.80
5.3.110.0441.73174.79
5.3.100.0441.54174.67
5.3.90.0351.74875.07
5.3.80.0411.73174.54
5.3.70.0331.81973.51
5.3.60.0371.51374.59
5.3.50.0461.70674.53
5.3.40.0561.49074.53
5.3.30.0351.73374.54
5.3.20.0241.48674.31
5.3.10.0541.54874.27
5.3.00.0391.50974.27
5.2.170.0291.14172.39
5.2.160.0411.15271.80
5.2.150.0521.25772.38
5.2.140.0321.17171.80
5.2.130.0311.15871.76
5.2.120.0351.25172.34
5.2.110.0361.32271.76
5.2.100.0391.16471.76
5.2.90.0421.31471.76
5.2.80.0441.25671.75
5.2.70.0271.26971.75
5.2.60.0461.27171.70
5.2.50.0361.37371.69
5.2.40.0401.27171.66
5.2.30.0331.18971.64
5.2.20.0391.22771.64
5.2.10.0381.27171.54
5.2.00.0301.26771.41
5.1.60.0461.28490.77
5.1.50.0261.25290.77
5.1.40.0491.27590.75
5.1.30.0461.66791.09
5.1.20.0541.28691.12
5.1.10.0401.23890.84
5.1.00.0411.26390.84
5.0.50.0401.96774.96
5.0.40.0421.96770.32
5.0.30.0501.95679.46
5.0.20.0661.93475.02
5.0.10.0621.94578.72
5.0.00.0371.96676.24
4.4.90.0391.96175.74
4.4.80.0521.96272.02
4.4.70.0431.96871.49
4.4.60.0372.00973.22
4.4.50.0471.96370.10
4.4.40.0521.98563.53
4.4.30.0581.96968.11
4.4.20.0391.96675.32
4.4.10.0451.95975.73
4.4.00.0401.96277.25
4.3.110.0471.96265.69
4.3.100.0411.98955.48
4.3.90.0531.95574.13
4.3.80.0421.95773.14
4.3.70.0431.96272.59
4.3.60.0441.96369.58
4.3.50.0441.95967.68
4.3.40.0401.96874.84
4.3.30.0481.95976.70
4.3.20.0281.97233.98
4.3.10.0271.98231.66
4.3.00.0170.90321.13

preferences:
38.05 ms | 401 KiB | 5 Q