Add Safe PHP functions

This commit is contained in:
Alex Cabal 2019-03-07 12:11:50 -06:00
parent 04a956886a
commit 58cc098058
260 changed files with 49458 additions and 45 deletions

View file

@ -0,0 +1,22 @@
<?php
namespace Safe;
use Safe\Exceptions\XmlrpcException;
/**
* Sets xmlrpc type, base64 or datetime, for a PHP string value.
*
* @param string|DateTime $value Value to set the type
* @param string $type 'base64' or 'datetime'
* @throws XmlrpcException
*
*/
function xmlrpc_set_type(string &$value, string $type): void
{
error_clear_last();
$result = \xmlrpc_set_type($value, $type);
if ($result === false) {
throw XmlrpcException::createFromPhpError();
}
}