I have a code where I open a socket connection. From time to time it happens that fgets returns false. I would like to find out why it happens. Is there a function that would provide more details about last error on $handle
? Something like preg_last_error
, json_last_error
, …
The same question can be applied to function stream_get_line().
I use PHP 5.4 and E_ALL
is in error_reporting (i.e. it includes even E_NOTICE
). No error was thrown.