1--TEST--
2Test http_build_query() function: usage variations - first arguments as object
3--CREDITS--
4Adam Gegotek <adam [dot] gegotek [at] gmail [dot] com>
5--FILE--
6<?php
7class UrlBuilder
8{
9  public $name = 'homepage';
10  public $page = 1;
11  protected $sort = 'desc,name';
12  private $access = 'admin';
13}
14
15$obj = new stdClass;
16$obj->name = 'homepage';
17$obj->page = 1;
18$obj->sort = 'desc,name';
19
20echo http_build_query($obj) . PHP_EOL;
21echo http_build_query(new UrlBuilder());
22?>
23--EXPECT--
24name=homepage&page=1&sort=desc%2Cname
25name=homepage&page=1
26