Web Analytics

PHP file_put_contents() Function

File FunctionPHP 5+

The file_put_contents() function performs a specific operation.

Syntax

file_put_contents($param): mixed

Parameters

Parameter Type Description
$param mixed Function parameter

Return Value

Returns the result of the operation.

Try It Online

Output
Click Run to execute your code

Common Use Cases

  • Data processing
  • Common PHP operations