stream_get_meta_data returns header as an array like this:
Array ( [timed_out] => [blocked] => 1 [eof] => [wrapper_data] => Array (  => HTTP/1.1 200 OK
I can get the status with $meta[‘wrapper_data’] but how can I fetch the status code from the value which would be HTTP/1.1 200 OK as explode by HTTP/1.1 is bad idea. Is it better to use regexp to get the code? or better to use
substr($meta['wrapper_data'], 9, 3) ?
/\d\d/ is better to get status code?