is there a concept like compressing php page in server and sending it to browser?
I'm not sure if anybody has thought of that before but that's a great idea for sending large amounts of html data to the user. I suppose you would use php to encode the data and javascript to decode the data. Never thought of that before.
Anyway, as for your other question for if internet speed is a factor. That is only true if the file size exceeds your internet speed. So for example, the most common internet speed is 25kbps which means that a file 25kb would take 1 second to load. In your case, if you download your php file and it turns out to be 200kb and you devide that by 8, if the answer of that sum = your internet speed then it would indeed be the speed of the connection making it slow. So below is the formula to calculate if it is your internet speed limiting the page load time.
x = internet speed in kb per second
y = time for page to load in seconds
z = size of page
if ((z/y)==x) {
internet speed is limiting the
page load time
} else {
you have sloppy/slow coding
}