PageRenderTime 149ms CodeModel.GetById 144ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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