mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-25 02:22:57 +01:00
e.g: params: array() template: /path{?params*} previous result: /path?params= correct result: /path Unfortunately PHP is unable to distinguish between an empty list array and an empty associative array. However this doesn't matter, because the empty case of either of these is considered "undefined" by the spec. http://tools.ietf.org/html/draft-gregorio-uritemplate-08#section-2.3 A variable defined as a list value is considered undefined if the list contains zero members. A variable defined as an associative array of (name, value) pairs is considered undefined if the array contains zero members or if all member names in the array are associated with undefined values. http://tools.ietf.org/html/draft-gregorio-uritemplate-08#section-3.2.1 A variable that is undefined (Section 2.3) has no value and is ignored by the expansion process. If all of the variables in an expression are undefined, then the expression's expansion is the empty string.