3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ "shenzhen" => [ "宝安区", "南山区", "福田区", "罗湖区", "盐田区", "龙岗区", "光明新区", "坪山新区", "龙华新区", "大鹏新区", "其它" ], "guangzhou" => [ "白云区", "天河区", "海珠区", "番禺区", "花都区", "黄埔区", "南沙区", "越秀区", "萝岗区", "荔湾区", "增城市", "从化市", "其它" ]; $city_list = array( "shenzhen" => _("深圳"), "guangzhou" => _("广州"), "foshan" => _("佛山"), "dongguan" => _("东莞")); $newArray = array(); foreach($city_list as $carr) { $newArray[] = str_replace(key($carr),"hello", $data); } print_r($newArray);

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)
5.6.80.0070.05720.40
5.6.70.4300.04020.52
5.5.240.0270.07020.27
5.4.400.0230.03718.88
5.4.390.0230.04019.26
5.4.380.0230.04018.96
5.4.370.0270.06019.06
5.4.360.0300.07319.24
5.4.350.0270.06319.09
5.4.340.0300.07318.87
5.4.320.0270.03318.95
5.4.310.0270.06719.22
5.4.300.0170.05319.09
5.4.290.0200.06019.21
5.4.280.0270.05318.94
5.4.270.0300.07018.98
5.4.260.0170.05719.23
5.4.250.0270.04318.85
5.4.240.0270.03719.15
5.4.230.0130.04319.23
5.4.220.0170.04019.05
5.4.210.0270.03018.96
5.4.200.0200.03719.00
5.4.190.0170.04019.18
5.4.180.0230.03018.86
5.4.170.0230.03318.99
5.4.160.0230.04319.20
5.4.150.0270.03719.22
5.4.140.0200.04016.39
5.4.130.0270.02716.30
5.4.120.0230.03016.29
5.4.110.0170.04016.55
5.4.100.0200.03316.45
5.4.90.0230.03716.54
5.4.80.0270.03316.35
5.4.70.0130.03716.43
5.4.60.0130.04316.45
5.4.50.0270.03016.35
5.4.40.0200.03716.42
5.4.30.0170.04016.53
5.4.20.0130.03716.32
5.4.10.0170.03716.43
5.4.00.0170.03715.79
5.3.290.0230.04714.62
5.3.280.0270.04014.43
5.3.270.0230.03014.46
5.3.260.0270.03014.56
5.3.250.0200.03714.45
5.3.240.0230.03014.48
5.3.230.0170.03714.68
5.3.220.0200.03314.47
5.3.210.0100.05014.52
5.3.200.0270.03314.43
5.3.190.0230.03314.43
5.3.180.0170.04014.44
5.3.170.0230.03014.59
5.3.160.0200.03714.61
5.3.150.0170.03714.44
5.3.140.0200.03714.59
5.3.130.0100.05014.45
5.3.120.0230.04014.49
5.3.110.0200.03314.41
5.3.100.0170.03713.99
5.3.90.0230.04013.98
5.3.80.0130.04013.85
5.3.70.0170.05313.85
5.3.60.0170.04313.81
5.3.50.0200.03313.89
5.3.40.0170.05313.79
5.3.30.0230.05313.94
5.3.20.0270.04013.60
5.3.10.0330.06013.71
5.3.00.0230.05713.57
5.2.170.0170.02713.35
5.2.160.0170.03013.35
5.2.150.0200.06313.35
5.2.140.0330.05013.35
5.2.130.0170.03013.35
5.2.120.0130.03713.35
5.2.110.0200.03313.35
5.2.100.0300.05313.35
5.2.90.0300.05013.35
5.2.80.0270.06013.35
5.2.70.0200.04713.35
5.2.60.0270.05713.35
5.2.50.0200.03313.35
5.2.40.0200.03013.35
5.2.30.0200.06013.35
5.2.20.0270.04013.35
5.2.10.0130.03313.35
5.2.00.0200.05013.35
5.1.60.0230.05013.35
5.1.50.0200.04713.35
5.1.40.0200.02713.35
5.1.30.0270.04713.35
5.1.20.0370.02713.35
5.1.10.0270.05013.35
5.1.00.0170.05713.35
5.0.50.0100.05013.35
5.0.40.0070.04713.35
5.0.30.0130.06013.35
5.0.20.0200.02713.35
5.0.10.0100.04713.35
5.0.00.0100.06713.35
4.4.90.0030.03313.35
4.4.80.0100.01713.35
4.4.70.0100.03313.35
4.4.60.0070.02713.35
4.4.50.0130.02013.35
4.4.40.0130.02013.35
4.4.30.0100.03713.35
4.4.20.0130.02313.35
4.4.10.0100.03313.35
4.4.00.0070.05313.35
4.3.110.0100.02713.35
4.3.100.0070.03013.35
4.3.90.0200.01713.35
4.3.80.0100.05313.35
4.3.70.0100.03013.35
4.3.60.0100.03313.35
4.3.50.0100.03313.35
4.3.40.0100.05013.35
4.3.30.0000.03313.35
4.3.20.0000.04013.35
4.3.10.0130.02313.35
4.3.00.0030.02313.35

preferences:
143.36 ms | 1394 KiB | 7 Q