mirror of
https://github.com/php/php-src.git
synced 2024-10-10 03:02:13 +00:00
27 lines
417 B
Plaintext
27 lines
417 B
Plaintext
|
--TEST--
|
||
|
SOAP Server 7: addfunction and getfunctions
|
||
|
--SKIPIF--
|
||
|
<?php require_once('skipif.inc'); ?>
|
||
|
--FILE--
|
||
|
<?php
|
||
|
function Add($x,$y) {
|
||
|
return $x+$y;
|
||
|
}
|
||
|
function Sub($x,$y) {
|
||
|
return $x-$y;
|
||
|
}
|
||
|
|
||
|
$server = new soapserver("http://testuri.org");
|
||
|
$server->addfunction(array("Sub","Add"));
|
||
|
var_dump($server->getfunctions());
|
||
|
echo "ok\n";
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
array(2) {
|
||
|
[0]=>
|
||
|
string(3) "Sub"
|
||
|
[1]=>
|
||
|
string(3) "Add"
|
||
|
}
|
||
|
ok
|