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);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function _() in /in/XVoqh:33 Stack trace: #0 {main} thrown in /in/XVoqh on line 33
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
47.02 ms | 401 KiB | 8 Q