$GLOBALS['xmlrpc_internalencoding']='ISO-8859-1';\r
\r
$GLOBALS['xmlrpcName']='XML-RPC for PHP';\r
- $GLOBALS['xmlrpcVersion']='3.1.1';\r
+ $GLOBALS['xmlrpcVersion']='3.1.2';\r
\r
// let user errors start at 800\r
$GLOBALS['xmlrpcerruser']=800;\r
}\r
}\r
\r
- /**\r
+ /**\r
* @deprecated\r
*/\r
function xmlrpcmsg($meth, $pars=0)\r
}\r
// be tolerant to line endings, and extra empty lines\r
$ar = preg_split("/\r?\n/", trim(substr($data, 0, $pos)));\r
- while(list(,$line) = @each($ar))\r
+ foreach($ar as $line)\r
{\r
// take care of multi-line headers and cookies\r
$arr = explode(':',$line,2);\r
}\r
\r
// poor man's version of print_r ???\r
- // DEPRECATED!\r
+ /// @deprecated\r
function dump($ar)\r
{\r
foreach($ar as $key => $val)\r
echo "$key => $val<br />";\r
if($key == 'array')\r
{\r
- while(list($key2, $val2) = each($val))\r
+ foreach($val as $key2 => $val2)\r
{\r
echo "-- $key2 => $val2<br />";\r
}\r
//}\r
}\r
\r
- // DEPRECATED\r
+ /// @deprecated\r
function serializeval($o)\r
{\r
// add check? slower, but helps to avoid recursion in serializing broken xmlrpcvals...\r
* Return next member element for xmlrpcvals of type struct.\r
* @return xmlrpcval\r
* @access public\r
+ * @deprecated this will be removed in future versions\r
*/\r
function structeach()\r
{\r
- return each($this->me['struct']);\r
+ return @each($this->me['struct']);\r
}\r
\r
- // DEPRECATED! this code looks like it is very fragile and has not been fixed\r
+ // this code looks like it is very fragile and has not been fixed\r
// for a long long time. Shall we remove it for 2.0?\r
+ /// @deprecated\r
function getval()\r
{\r
// UNSTABLE\r
- reset($this->me);\r
- list($a,$b)=each($this->me);\r
+ $b = reset($this->me);\r
// contributed by I Sofer, 2001-03-24\r
// add support for nested arrays to scalarval\r
// i've created a new method here, so as to\r
\r
if(is_array($b))\r
{\r
- @reset($b);\r
- while(list($id,$cont) = @each($b))\r
+ foreach($b as $id => $cont)\r
{\r
$b[$id] = $cont->scalarval();\r
}\r
if(is_object($b))\r
{\r
$t = get_object_vars($b);\r
- @reset($t);\r
- while(list($id,$cont) = @each($t))\r
+ foreach($t as $id => $cont)\r
{\r
$t[$id] = $cont->scalarval();\r
}\r
- @reset($t);\r
- while(list($id,$cont) = @each($t))\r
+ foreach($t as $id => $cont)\r
{\r
@$b->$id = $cont;\r
}\r
function scalartyp()\r
{\r
reset($this->me);\r
- list($a,)=each($this->me);\r
+ $a = key($this->me);\r
if($a==$GLOBALS['xmlrpcI4'])\r
{\r
$a=$GLOBALS['xmlrpcInt'];\r
case 'scalar':\r
if (in_array('extension_api', $options))\r
{\r
- reset($xmlrpc_val->me);\r
- list($typ,$val) = each($xmlrpc_val->me);\r
+ $val = reset($xmlrpc_val->me);\r
+ $typ = key($xmlrpc_val->me);\r
switch ($typ)\r
{\r
case 'dateTime.iso8601':\r
else\r
{\r
$arr = array();\r
- reset($php_val);\r
- while(list($k,$v) = each($php_val))\r
+ foreach($php_val as $k => $v)\r
{\r
$arr[$k] = php_xmlrpc_encode($v, $options);\r
}\r