/hphp/test/zend/good/ext/soap/tests/bugs/bug38004.php

http://github.com/facebook/hiphop-php · PHP · 39 lines · 34 code · 5 blank · 0 comment · 0 complexity · 312fcacc4e5c986643096a5c9e816359 MD5 · raw file

  1. <?hh
  2. function Test($param) {
  3. ZendGoodExtSoapTestsBugsBug38004::$g = $param->strA."\n".$param->strB."\n";
  4. return ZendGoodExtSoapTestsBugsBug38004::$g;
  5. }
  6. class TestSoapClient extends SoapClient {
  7. function __construct($wsdl) {
  8. parent::__construct($wsdl);
  9. $this->server = new SoapServer($wsdl);
  10. $this->server->addFunction('Test');
  11. }
  12. function __doRequest($request, $location, $action, $version, $one_way = 0) {
  13. ob_start();
  14. $this->server->handle($request);
  15. $response = ob_get_contents();
  16. ob_end_clean();
  17. return $response;
  18. }
  19. }
  20. abstract final class ZendGoodExtSoapTestsBugsBug38004 {
  21. public static $g;
  22. }
  23. <<__EntryPoint>>
  24. function main_entry(): void {
  25. $client = new TestSoapClient(dirname(__FILE__).'/bug38004.wsdl');
  26. $strA = 'test &amp; test';
  27. $strB = 'test & test';
  28. $res = $client->__soapcall(
  29. 'Test',
  30. varray[darray['strA'=>$strA, 'strB'=>$strB]],
  31. );
  32. print_r($res);
  33. print_r(ZendGoodExtSoapTestsBugsBug38004::$g);
  34. }