3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $query = 'UPDATE `table_name` SET `field1_name` = :? WHERE `field2_name` = :?'; $bind_marker = '?'; $bind_values = array("'foo'", "'bar'"); echo str_replace($bind_marker, $bind_values, $sql);
based on KWfMc
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: sql in /in/tMg2h on line 5 Notice: Array to string conversion in /in/tMg2h on line 5
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: sql in /in/tMg2h on line 5 Notice: Array to string conversion in /in/tMg2h on line 5