I understand content length to be the size of an object in byte e.g. 1 byte or 1024bytes, etc however what is data length? Not sure whether it is language specific but if it is I would like to know how it applies to PHP and ASP.NET
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For object size you can use memory_get_usage() as per the linked answer.
For file size you can use filesize();
EIDT: in line with updated query.
As per your comment on the question you’d be looking for filesize(), I think.
instantiated.
Imagine a sheet of paper with ten numbers on it and enough space to write another ten or so. As long as you don’t edit the text on the sheet of paper its contents will remain the same regardless of whether or not you can see or even interact with the sheet of paper.
Now imagine you need three of these numbers for a task, you’ve (as an example) the capacity to remember a sequence of up to five numbers, so you memorise the sequence. Once you’ve carried out the task you required the sequence for it can be discarded from (your) memory to free up space. Once the sequence has been freed from memory (object destroyed) you will no longer be able to recollect it or similarly if you experience an unexpected life exception, say knock yourself out and you forgot the sequence, the sheet of paper does not.