xref: /PHP-8.2/ext/curl/tests/curl_escape.phpt (revision ca423a1b)
1--TEST--
2Test curl_escape and curl_unescape() functions
3--EXTENSIONS--
4curl
5--FILE--
6<?php
7$str = "http://www.php.net/ ?!";
8
9$a = curl_init();
10$escaped = curl_escape($a, $str);
11$original = curl_unescape($a, $escaped);
12var_dump($escaped, $original);
13var_dump(curl_unescape($a, 'a%00b'));
14?>
15--EXPECTF--
16string(36) "http%3A%2F%2Fwww.php.net%2F%20%3F%21"
17string(22) "http://www.php.net/ ?!"
18string(3) "a%0b"
19