Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@JonStory While I disagree with the movie's change here (as I do with many other changes), Harry did make a similar choice there as well, by breaking the Elder Wand.
This is a very good answer. To further confirm it, I'd like to mention how Hermione was found: with a mirror in her hand. She was using that mirror to check for the Basilisk around the corner, which verifies the theory in this answer that the Basilisk was travelling via corridors, and only (or mostly) used pipes to get between the Chamber of Secrets and the girls' bathroom.