3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['轻型飞', '机无人', '机广告飞', '艇无人飞', '艇遥控飞', '艇航拍飞', '艇载人气', '球三角', '翼动力三角', '翼滑翔', '机测绘无人', '机大疆无人', '机遥控无人', '机航拍飞行', '器航拍无人', '机飞', '艇滑翔', '伞遥控飞', '机动力滑翔', '伞载人飞', '艇动力', '伞运动飞', '机三角翼飞', '机飞行航', '模四轴飞', '行遥控四', '轴燃油遥控飞', '机燃油遥控直升', '机油动遥控飞', '机油动遥控直升', '机四旋翼飞行', '器四旋翼无人', '机遥控航', '模无人驾驶自由气', '球系留气', '球四轴飞行', '器超轻型飞', '机轻型直升机', '超轻型直升机', '四轴无人机', '四轴航模']; $sqls = []; $head = 'select id,goods_name,content,goods_description from shop_goods where '; foreach ($arr as $v) { $fields = ['goods_name' => "'%$v%'", 'content' => "'%$v%'", 'goods_description' => "'%$v%'"]; $sql = (http_build_str($fields)); $sql = str_replace('=', ' like ', $sql); $wheres = explode('&', $sql); foreach ($wheres as $where) { $sqls[] = $head.$where; } } foreach ($sqls as $sql) { echo $sql."\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function http_build_str() in /in/hfvFc:10 Stack trace: #0 {main} thrown in /in/hfvFc on line 10
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:
73.4 ms | 401 KiB | 8 Q