You are here

public function Socket::fwrite in reCAPTCHA 8.2

Same name and namespace in other branches
  1. 6.2 recaptcha-php/src/ReCaptcha/RequestMethod/Socket.php \ReCaptcha\RequestMethod\Socket::fwrite()
  2. 7.2 recaptcha-php/src/ReCaptcha/RequestMethod/Socket.php \ReCaptcha\RequestMethod\Socket::fwrite()

fwrite

Parameters

string $string:

int $length:

Return value

int | bool

See also

http://php.net/fwrite

File

recaptcha-php/src/ReCaptcha/RequestMethod/Socket.php, line 66

Class

Socket
Convenience wrapper around native socket and file functions to allow for mocking.

Namespace

ReCaptcha\RequestMethod

Code

public function fwrite($string, $length = null) {
  return fwrite($this->handle, $string, is_null($length) ? strlen($string) : $length);
}