3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = array("oh" => "D:","do"=>";o"); $sql = "INSERT INTO ".'cms_lol'." (" . implode(', ',array_keys($data)) . ") VALUES (".str_repeat('?, ', count($data)-1)."?) ON DUPLICATE KEY UPDATE ". implode(' = ?, ',array_keys($data)) . " = ?"; echo $sql;
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
INSERT INTO cms_lol (oh, do) VALUES (?, ?) ON DUPLICATE KEY UPDATE oh = ?, do = ?