3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function __toString() { return "bar"; } } $params = array(); $params['a'] = 'b'; $params['foo'] = (string) new foo(); $query = http_build_query($params); var_dump($params, $query);

preferences:
48.74 ms | 411 KiB | 5 Q