3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $queryArray = array( 'ebben' => array( //$changes 'ezt' => 'erre', //No escape 'ezt2' => 'nes:erre', array( //$condition 'where' => array( 'ez' => 'ezzel' ) ) ) ); var_dump(array_keys($fields)); //'UPDATE _table_ SET _field_ = _value_ WHERE _field_ = _value_'; foreach($queryArray as $table => $fields) { print $table . ' SET ' . implode(' = ? ', array_keys($fields)); }
based on P9rUd
Output for 5.3.0 - 7.1.0
Notice: Undefined variable: fields in /in/uTLDo on line 16 Warning: array_keys() expects parameter 1 to be array, null given in /in/uTLDo on line 16 NULL ebben SET ezt = ? ezt2 = ? 0
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: fields in /in/uTLDo on line 16 Warning: array_keys(): The first argument should be an array in /in/uTLDo on line 16 NULL ebben SET ezt = ? ezt2 = ? 0
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: fields in /in/uTLDo on line 16 Warning: array_keys(): The first argument should be an array in /in/uTLDo on line 16 NULL ebben SET ezt = ? ezt2 = ? 0
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: fields in /in/uTLDo on line 16 Warning: array_keys() [http://www.php.net/function.array-keys]: The first argument should be an array in /in/uTLDo on line 16 NULL ebben SET ezt = ? ezt2 = ? 0