PageRenderTime 49ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/zend/bad/ext/soap/tests/bugs/bug34643.php

http://github.com/facebook/hiphop-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
  1. <?php
  2. ini_set("soap.wsdl_cache_enabled", 0);
  3. class fp {
  4. public function get_it($opt="zzz") {
  5. return $opt;
  6. }
  7. }
  8. class LocalSoapClient extends SoapClient {
  9. function __construct($wsdl, $options) {
  10. parent::__construct($wsdl, $options);
  11. $this->server = new SoapServer($wsdl, $options);
  12. $this->server->setClass('fp');
  13. }
  14. function __doRequest($request, $location, $action, $version, $one_way = 0) {
  15. ob_start();
  16. $this->server->handle($request);
  17. $response = ob_get_contents();
  18. ob_end_clean();
  19. return $response;
  20. }
  21. }
  22. $cl = new LocalSoapClient(dirname(__FILE__).'/bug34643.wsdl', array("trace"=>1));
  23. print_r($cl->__getFunctions());
  24. echo $cl->get_it("aaa")."\n";
  25. echo $cl->get_it()."\n";
  26. var_dump($cl->get_it(null));
  27. ?>