1, 'Id'=>[5,6]]); check('scalar then IN binds [1,5,6]', $v === [1,5,6]); check('placeholder count matches', substr_count($sql, '?') === count($v)); list($sql, $v) = run(['Id'=>[5,6], 'ServerId'=>1]); check('IN then scalar binds [5,6,1]', $v === [5,6,1]); list($sql, $v) = run(['A'=>[1,2], 'B'=>[3,4,5]]); check('two IN arrays bind [1,2,3,4,5]', $v === [1,2,3,4,5]); list($sql, $v) = run(['A'=>2, 'B'=>['x'=>7,'y'=>8], 'C'=>3]); check('associative IN array is re-indexed', $v === [2,7,8,3]); list($sql, $v) = run(['A'=>1, 'B'=>[], 'C'=>2]); check('empty IN array adds no values', $v === [1,2] && substr_count($sql, '?') === 2); echo "\n$tests tests, $failures failures\n"; exit($failures ? 1 : 0);