3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = array(1,3,2); foreach ($arr as $key => $value) { $data = [ 'table' => 'tbl_worker_exp', 'val'=>array( 'country_id'=>$value), 'where' => ['sub_id'=>2] ]; show($data); } function show($arr){ echo "UPDATE ".$arr['table']." SET country_id=".$arr['val']['country_id']." WHERE sub_id= ".$arr['where']['sub_id']; }
Output for rfc.property-hooks, git.master, git.master_jit
UPDATE tbl_worker_exp SET country_id=1 WHERE sub_id= 2UPDATE tbl_worker_exp SET country_id=3 WHERE sub_id= 2UPDATE tbl_worker_exp SET country_id=2 WHERE sub_id= 2

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:
41.33 ms | 2674 KiB | 4 Q