$from) ? ($to - 1) : ($to), # adjust if moving into the part we moved in the first splice 0, # don't delete anything $moving # insert these ); # check if it matches if (($tests % 10) === 9) { $db_ids = db_get_column('test_db_reposition', 'id', 'order by ord'); for ($i = 0; $i < 10; ++$i) { if ($ids[$i] != $db_ids[$i]) { message('fail'); return; } } } } message("pass! $max_tests repositions checked every 10"); }