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); ksort($array1); ksort($array2); $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.4.00.0300.28956.12
7.3.120.0370.44756.50
7.3.110.0270.24955.96
7.3.100.0130.38556.48
7.3.90.0300.39956.17
7.3.80.0370.38356.32
7.3.70.0130.44656.17
7.3.60.0230.29556.20
7.3.50.0300.40056.20
7.3.40.0200.26556.09
7.3.30.0230.31056.30
7.3.20.0730.43358.20
7.3.10.0710.34258.84
7.3.00.0560.26558.00
7.2.250.0270.47255.90
7.2.240.0270.40255.79
7.2.230.0430.43955.55
7.2.220.0200.30855.67
7.2.210.0230.41556.04
7.2.200.0200.48955.95
7.2.190.0300.29655.77
7.2.180.0230.27555.88
7.2.170.0170.29656.02
7.1.330.0070.87657.50
7.1.320.0130.73957.75
7.1.310.0230.92557.86
7.1.300.0230.87657.60
7.1.290.0130.87556.89
7.1.280.0730.74057.93
7.1.270.0460.79156.81
7.1.260.0200.67857.88
7.1.70.1980.45658.56
7.1.60.0100.40959.09
7.1.50.0130.34477.03
7.1.00.0070.44064.32
7.0.200.0200.39458.89
7.0.140.0100.48763.95
7.0.60.0300.39060.55
7.0.50.0270.40358.55
7.0.40.0070.37322.72
7.0.30.0630.44322.74
7.0.20.0570.38322.64
7.0.10.0330.39322.70
7.0.00.0130.41322.67
5.6.280.0230.89385.21
5.6.210.0200.79784.80
5.6.200.0170.72082.48
5.6.190.0170.81084.71
5.6.180.0470.74784.80
5.6.170.0700.75084.35
5.6.160.0230.71384.54
5.6.150.0330.73082.49
5.6.140.0330.78082.48
5.6.130.0200.78382.32
5.6.120.0230.80385.37
5.6.110.0330.72385.25
5.6.100.0400.80085.38
5.6.90.0230.79385.33
5.6.80.0470.71784.70
5.6.70.0630.76784.79
5.5.350.0130.69084.83
5.5.340.0330.76082.30
5.5.330.0200.85384.54
5.5.320.0230.78084.51
5.5.310.0600.80784.59
5.5.300.0230.83382.34
5.5.290.0300.84082.35
5.5.280.0270.75785.11
5.5.270.0270.80785.09
5.5.260.0270.84385.32
5.5.250.0100.86084.70
5.5.240.0070.87384.55
5.4.450.0670.73383.71
5.4.440.0370.77783.84
5.4.430.0370.74083.68
5.4.420.0300.78783.61
5.4.410.0530.76383.33
5.4.400.0270.85383.52
5.4.390.4130.75083.17
5.4.380.0500.82383.13
5.4.370.0570.79783.29
5.4.360.0430.81083.50
5.4.350.0630.82783.49
5.4.340.0430.81783.38
5.4.320.0500.78383.38
5.4.310.0800.75083.14
5.4.300.0340.99476.63
5.4.290.0310.96676.85
5.4.280.0411.01676.73
5.4.270.0400.92276.52
5.4.260.0320.96976.77
5.4.250.0380.98576.75
5.4.240.0300.92976.73
5.4.230.0330.91476.74
5.4.220.0410.98676.75
5.4.210.0280.93776.73
5.4.200.0271.18376.72
5.4.190.0421.31976.74
5.4.180.0561.73676.73
5.4.170.0401.18776.51
5.4.160.0471.12276.73
5.4.150.0611.45176.73
5.4.140.0401.18276.41
5.4.130.0300.90976.41
5.4.120.0531.16876.36
5.4.110.0491.15676.36
5.4.100.0531.27076.38
5.4.90.0681.27574.30
5.4.80.0470.98976.35
5.4.70.0521.05776.13
5.4.60.0401.04176.34
5.4.50.0341.11971.88
5.4.40.0321.05573.75
5.4.30.0401.00263.13
5.4.20.0251.02576.33
5.4.10.0391.05276.35
5.4.00.0550.98975.85
5.3.290.4100.89777.89
5.3.280.3430.84077.78
5.3.270.3800.86777.82
5.3.260.3701.05377.79
5.3.250.1000.82777.83
5.3.240.0430.91777.79
5.3.230.0430.82077.73
5.3.220.3170.89777.71
5.3.210.0270.87777.71
5.3.200.0400.91377.79
5.3.190.0170.86077.79
5.3.180.0400.88377.75
5.3.170.0370.89777.70
5.3.160.0630.91777.79
5.3.150.0530.91077.79
5.3.140.0871.33077.69
5.3.130.3801.24077.69
5.3.120.0400.86377.57
5.3.110.0700.92377.70
5.3.100.3531.08077.18
5.3.90.0670.90077.07
5.3.80.0830.88377.24
5.3.70.0500.89077.08

preferences:
29.57 ms | 400 KiB | 5 Q