3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $queryArray = array( 'ebben' => array( //$changes 'ezt' => 'erre', //No escape 'ezt' => 'nes:erre', array( //$condition 'where' => array( 'ez' => 'ezzel' ) ) ) ); //'UPDATE _table_ SET _field_ = _value_ WHERE _field_ = _value_'; foreach($queryArray as $table => $fields) { print $table . ' SET ' . implode(',', array_keys($record)); }
based on Fpv99
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: record in /in/3beGo on line 18 Warning: array_keys() expects parameter 1 to be array, null given in /in/3beGo on line 18 Warning: implode(): Invalid arguments passed in /in/3beGo on line 18 ebben SET
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: record in /in/3beGo on line 18 Warning: array_keys() expects parameter 1 to be an array or collection in /in/3beGo on line 18 Warning: Invalid operand type was used: implode() expects a container as one of the arguments in /in/3beGo on line 18 ebben SET
Output for 5.2.5 - 5.2.17
Notice: Undefined variable: record in /in/3beGo on line 18 Warning: array_keys(): The first argument should be an array in /in/3beGo on line 18 Warning: implode(): Invalid arguments passed in /in/3beGo on line 18 ebben SET
Output for 5.0.4 - 5.2.4
Notice: Undefined variable: record in /in/3beGo on line 18 Warning: array_keys(): The first argument should be an array in /in/3beGo on line 18 Warning: implode(): Bad arguments. in /in/3beGo on line 18 ebben SET
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: record in /in/3beGo on line 18 Warning: array_keys(): The first argument should be an array in /in/3beGo on line 18 Warning: implode(): Bad arguments. in /in/3beGo on line 18 ebben SET
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: record in /in/3beGo on line 18 Warning: array_keys() [http://www.php.net/function.array-keys]: The first argument should be an array in /in/3beGo on line 18 Warning: implode() [http://www.php.net/function.implode]: Bad arguments. in /in/3beGo on line 18 ebben SET