/hphp/test/zend/bad/ext/soap/tests/bugs/bug34643.php
PHP | 33 lines | 27 code | 6 blank | 0 comment | 0 complexity | 58b53afe350e8cf92d9b05ba33db2117 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?php
- ini_set("soap.wsdl_cache_enabled", 0);
- class fp {
- public function get_it($opt="zzz") {
- return $opt;
- }
- }
- class LocalSoapClient extends SoapClient {
- function __construct($wsdl, $options) {
- parent::__construct($wsdl, $options);
- $this->server = new SoapServer($wsdl, $options);
- $this->server->setClass('fp');
- }
- function __doRequest($request, $location, $action, $version, $one_way = 0) {
- ob_start();
- $this->server->handle($request);
- $response = ob_get_contents();
- ob_end_clean();
- return $response;
- }
- }
- $cl = new LocalSoapClient(dirname(__FILE__).'/bug34643.wsdl', array("trace"=>1));
- print_r($cl->__getFunctions());
- echo $cl->get_it("aaa")."\n";
- echo $cl->get_it()."\n";
- var_dump($cl->get_it(null));
- ?>