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(200000); $array2 = array(400000); $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.1.70.0770.53676.98
7.1.60.0270.52477.31
7.1.50.0200.48395.23
7.1.00.0100.55382.45
7.0.201.1870.56777.01
7.0.140.0130.53782.12
7.0.60.0300.56381.76
7.0.50.0230.52079.54
7.0.40.0070.47023.95
7.0.30.0500.52323.95
7.0.20.0330.50323.85
7.0.10.0130.46723.94
7.0.00.0130.54323.89
5.6.280.0170.85085.63
5.6.210.0300.72085.18
5.6.200.0170.78382.55
5.6.190.0200.74385.02
5.6.180.0500.77085.02
5.6.170.0330.71384.96
5.6.160.0170.79084.80
5.6.150.0330.78082.69
5.6.140.0230.79782.66
5.6.130.0230.80782.65
5.6.120.0400.78085.45
5.6.110.0270.74785.68
5.6.100.0430.78085.55
5.6.90.0200.78085.61
5.6.80.0170.73084.91
5.5.350.0570.71084.98
5.5.340.0200.86782.51
5.5.330.0170.77784.73
5.5.320.0330.78084.75
5.5.310.0600.98384.75
5.5.300.0370.82082.52
5.5.290.0401.01382.33
5.5.280.0230.83385.31
5.5.270.0170.76785.42
5.5.260.0270.85385.42
5.5.250.0300.80085.34
5.5.240.0270.62384.72
5.4.450.0431.23383.96
5.4.440.1671.29784.02
5.4.430.1201.49783.94
5.4.420.1131.36783.95
5.4.410.2001.34783.84
5.4.400.1671.28783.43
5.4.390.1101.28083.54
5.4.380.0931.45083.34
5.4.370.0771.25383.40
5.4.360.0671.25783.45
5.4.350.0771.32383.29
5.4.340.0831.25383.42
5.4.320.0230.92677.27
5.4.310.0351.13877.27
5.4.300.0511.23177.27
5.4.290.0441.08377.27
5.4.280.0320.97277.17
5.4.270.0280.96777.17
5.4.260.0351.04677.16
5.4.250.0321.01577.16
5.4.240.0321.01877.16
5.4.230.0410.97777.16
5.4.220.0621.58377.16
5.4.210.0301.17177.16
5.4.200.0411.07877.16
5.4.190.0340.99877.16
5.4.180.0351.04377.15
5.4.170.0451.13877.16
5.4.160.0310.95777.16
5.4.150.0280.93277.16
5.4.140.0420.99076.84
5.4.130.0461.03476.82
5.4.120.0360.98676.78
5.4.110.0491.04176.78
5.4.100.0461.03376.78
5.4.90.0401.06776.78
5.4.80.0240.96276.78
5.4.70.0380.99376.78
5.4.60.0400.99576.77
5.4.50.0291.08276.77
5.4.40.0380.96476.77
5.4.30.0361.00776.76
5.4.20.0270.96276.76
5.4.10.0321.13976.76
5.4.00.0350.94676.25
5.3.290.0821.12276.11
5.3.280.0451.37176.04
5.3.270.0291.10676.05
5.3.260.0471.09776.05
5.3.250.0351.06176.05
5.3.240.0361.09376.05
5.3.230.0451.07276.05
5.3.220.0451.13276.01
5.3.210.0471.14276.01
5.3.200.0311.10176.01
5.3.190.0341.02976.02
5.3.180.0411.19076.02
5.3.170.0521.38276.02
5.3.160.0411.28576.01
5.3.150.0431.12976.01
5.3.140.0521.35276.00
5.3.130.0491.21676.00
5.3.120.0421.20675.99
5.3.110.0451.07676.00
5.3.100.0431.13676.13
5.3.90.0421.12275.47
5.3.80.0381.14175.46
5.3.70.0421.21475.46
5.3.60.0351.30675.45
5.3.50.0341.09075.39
5.3.40.0361.06375.39
5.3.30.0471.53275.36
5.3.20.0521.19275.14
5.3.10.0411.10075.09
5.3.00.0321.17475.08
5.2.170.0471.27573.09
5.2.160.0411.33673.09
5.2.150.0411.20573.09
5.2.140.0371.28973.09
5.2.130.0501.54573.05
5.2.120.0571.18373.05
5.2.110.0361.39473.05
5.2.100.0531.63773.05
5.2.90.0231.20273.05
5.2.80.0351.52173.05
5.2.70.0441.24573.05
5.2.60.0431.36673.00
5.2.50.0511.28972.97
5.2.40.0601.94872.54
5.2.30.0441.28172.68
5.2.20.0351.71072.66
5.2.10.0432.03567.07
5.2.00.0651.96192.73
5.1.60.0591.949106.25
5.1.50.0661.940119.66
5.1.40.0601.951132.48
5.1.30.0721.937111.86
5.1.20.0711.946126.07
5.1.10.0521.959109.57
5.1.00.0651.943133.19
5.0.50.0511.96369.60
5.0.40.0301.97660.91
5.0.30.0381.97163.18
5.0.20.0471.96762.87
5.0.10.0411.96479.13
5.0.00.0561.96865.43
4.4.90.0301.97570.13
4.4.80.0391.96872.84
4.4.70.0451.99658.87
4.4.60.0601.98258.83
4.4.50.0631.94459.50
4.4.40.0521.96466.86
4.4.30.0431.97072.04
4.4.20.0381.97264.68
4.4.10.0381.97364.06
4.4.00.0521.97657.30
4.3.110.0581.99158.87
4.3.100.0532.05147.27
4.3.90.0461.97453.45
4.3.80.0291.97675.75
4.3.70.0321.97575.38
4.3.60.0411.97373.34
4.3.50.0491.96267.90
4.3.40.0631.95063.00
4.3.30.0491.99251.71
4.3.20.0242.01024.86
4.3.10.0331.99121.68
4.3.00.0101.43324.27

preferences:
42.09 ms | 401 KiB | 5 Q