I think Row1 may have to help you with this issue, I am not a PHP expert. However, are you and your classmate using the same host or the same webserver?
Some servers are configured differently and have different results.
Also, you may find different results with different server emulators. Please tell us more.