# SoapParam::__construct

(PHP 5, PHP 7, PHP 8)

SoapParam::__construct — SoapParam constructor

### 说明

public SoapParam::__construct(mixed `$data`, string `$name`)

Constructs a new SoapParam object.

### 参数

`data`

  The data to pass or return. This parameter can be passed directly as PHP value, but in this case it will be named as `paramN` and the SOAP service may not understand it.

`name`

  The parameter name.

### 示例

示例 #1 SoapParam::__construct() example

`<?php
$client = new SoapClient(null,array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/"));
$client->SomeFunction(new SoapParam($a, "a"),
new SoapParam($b, "b"),
new SoapParam($c, "c"));
?>`

### 参见

- SoapClient::__soapCall() - Calls a SOAP function
- SoapVar::__construct() - SoapVar constructor

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open