1--TEST--
2Test http_build_query() function: usage variations - testing four parameter added in PHP 5.4.0
3--CREDITS--
4Adam Gegotek <adam [dot] gegotek [at] gmail [dot] com>
5--FILE--
6<?php
7/* Prototype  : string http_build_query ( mixed $query_data [, string $numeric_prefix [, string $arg_separator [, int $enc_type = PHP_QUERY_RFC1738 ]]] )
8 * Description: Generates a URL-encoded query string from the associative (or indexed) array provided.
9 * Source code: ext/standard/http.c
10*/
11
12$oDimensional = array(
13  "name" => "main page",
14  "sort" => "desc,admin",
15  "equation" => "10 + 10 - 5"
16);
17
18echo http_build_query($oDimensional, '', ini_get('arg_separator.output'), PHP_QUERY_RFC1738) . PHP_EOL;
19echo http_build_query($oDimensional, '', ini_get('arg_separator.output'), PHP_QUERY_RFC3986);
20?>
21--EXPECTF--
22name=main+page&sort=desc%2Cadmin&equation=10+%2B+10+-+5
23name=main%20page&sort=desc%2Cadmin&equation=10%20%2B%2010%20-%205
24