3v4l.org

run code in 300+ PHP versions simultaneously
<?php $updates = [ [ "service" => "k", "price" => "85.0", "id" => "442" ], [ "service" => "τεσ", "price" => "66.0", "price_show" => "0", "id" => "463" ] ]; $allowed = array_flip([ 'service', 'price', 'price_show', 'id' ]); foreach ($updates as $update) { $update = array_intersect_key($update, $allowed); $id = array_pop($update); $set = []; foreach ($update as $field => $value) { $set[] = "`{$field}`=:{$value}"; } $update = "UPDATE some_table SET " . implode(', ', $set). " WHERE serviceID=".$id; echo $update, "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
UPDATE some_table SET `service`=:k, `price`=:85.0 WHERE serviceID=442 UPDATE some_table SET `service`=:τεσ, `price`=:66.0, `price_show`=:0 WHERE serviceID=463

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:
89.7 ms | 405 KiB | 5 Q