Fsockopen::connect_error_handler( int $errno, string $errstr )

In this article

Error handler for stream_socket_client()

Parameters

$errnointrequired
Error number (e.g. E_WARNING)
$errstrstringrequired
Error message

Source

public function connect_error_handler($errno, $errstr) {
	// Double-check we can handle it
	if (($errno & E_WARNING) === 0 && ($errno & E_NOTICE) === 0) {
		// Return false to indicate the default error handler should engage
		return false;
	}

	$this->connect_error .= $errstr . "\n";
	return true;
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.