pdo->prepare( 'INSERT INTO move_audit_log (actor, action, target, before_json, after_json, ts) VALUES (?, ?, ?, ?, ?, ?)' ); $st->execute([ $actor, $action, $target, json_encode($before, JSON_THROW_ON_ERROR), json_encode($after, JSON_THROW_ON_ERROR), time(), ]); } }