So I was getting fatal errors when handling remote-site file sizes and was removing pieces of the code to find the culprit, which was get_headers
. I then printed its value and it said it was an array rather than a string (or number).
print_r(get_headers("https://www.example.com/folders/file.zip",1)["Content-Length"]);
Array
(
[0] => 169
[1] => 17936534
)
Why is this?