Function __global->fwrite

Definitions

sources_custom/phpstub.php

  • Binary-safe file write.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$handle resource No No required parameter N/A N/A The file handle
$string string No No required parameter N/A N/A The string to write to the file
$length ?integer No No Null N/A N/A The length of data to write (null: all of $string)

Returns

  • The number of bytes written (false: error)
  • Type: ~integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Binary-safe file write.
 *
 * @param  resource $handle The file handle
 * @param  string $string The string to write to the file
 * @param  ?integer $length The length of data to write (null: all of $string)
 * @return ~integer The number of bytes written (false: error)
 */

function fwrite($handle, string $string, ?int $length = null)