curl_escape

PHP 5 >= 5.5.0, PHP 7, PHP 8
curl_escape - URL encodes the given string
Manual
Code Examples

curl_escape( CurlHandle$handle, string$string ): string|false

This function URL encodes the given string according to RFC 3986.

Parameters

handle

A cURL handle returned by curl_init.

string

The string to be encoded.

Return Values

Returns escaped string or false on failure.

Changelog

Version Description
8.0.0 handle expects a CurlHandle instance now; previously, a resource was expected.

Related Functions

Example of curl_escape

Show all examples for curl_escape

PHP Version: