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--SKIPIF-- 6<?php 7 if (version_compare(PHP_VERSION, '5.4.0', '<')) die("skip this test if PHP_VERSION is less than 5.4.0"); 8?> 9--FILE-- 10<?php 11/* Prototype : string http_build_query ( mixed $query_data [, string $numeric_prefix [, string $arg_separator [, int $enc_type = PHP_QUERY_RFC1738 ]]] ) 12 * Description: Generates a URL-encoded query string from the associative (or indexed) array provided. 13 * Source code: ext/standard/http.c 14*/ 15 16$oDimensional = array( 17 "name" => "main page", 18 "sort" => "desc,admin", 19 "equation" => "10 + 10 - 5" 20); 21 22echo http_build_query($oDimensional, '', ini_get('arg_separator.output'), PHP_QUERY_RFC1738) . PHP_EOL; 23echo http_build_query($oDimensional, '', ini_get('arg_separator.output'), PHP_QUERY_RFC3986); 24?> 25--EXPECTF-- 26name=main+page&sort=desc%2Cadmin&equation=10+%2B+10+-+5 27name=main%20page&sort=desc%2Cadmin&equation=10%20%2B%2010%20-%205 28