Socket
in package
Convenience wrapper around native socket and file functions to allow for mocking.
Table of Contents
Properties
- $handle : mixed
Methods
- fclose() : bool
- fclose
- feof() : bool
- feof
- fgets() : string
- fgets
- fsockopen() : resource
- fsockopen
- fwrite() : int|bool
- fwrite
Properties
$handle
private
mixed
$handle
= null
Methods
fclose()
fclose
public
fclose() : bool
Tags
Return values
boolfeof()
feof
public
feof() : bool
Tags
Return values
boolfgets()
fgets
public
fgets([int $length = null ]) : string
Parameters
- $length : int = null
Tags
Return values
stringfsockopen()
fsockopen
public
fsockopen(string $hostname[, int $port = -1 ][, int &$errno = 0 ][, string &$errstr = '' ][, float $timeout = null ]) : resource
Parameters
- $hostname : string
- $port : int = -1
- $errno : int = 0
- $errstr : string = ''
- $timeout : float = null
Tags
Return values
resourcefwrite()
fwrite
public
fwrite(string $string[, int $length = null ]) : int|bool
Parameters
- $string : string
- $length : int = null