the only way they will know you've opened it is if you leave any damage on the chrome piece or the rubber part between the glass/chrome of the iphone by perhaps, inserting a screwdriver to wedge open the iphone after removing the bottom two screws.
however you remove any of the internal hardware. they will know, because you need to remove some blacktape to remove some screws. and that tape is quite tough. so they will see if it has been tampered with. if your decide to do this, and say..install a new LCD, they will know because the LCD, digitizer, and accelorometer/proximity sensors connectors will not be the same as the original apple ones, which have orange numbered stickers on them. so you can try take them off and put them on the new connectors. but i'm pretty sure they'll know.
i know this from experience
i broke my digitizer/lcd and replaced them myself, therefor voidin my warranty, but it still didnt work, and sent it off to the o2 shop for repairs, im waiting to see what they say when they find out ive replaced the hardware lmao.