Files
kulakpos_web/vendor/thecodingmachine/safe/generated/8.1/var.php

21 lines
340 B
PHP
Raw Normal View History

2026-03-30 14:54:57 +07:00
<?php
namespace Safe;
use Safe\Exceptions\VarException;
/**
2026-04-18 20:32:18 +07:00
* @param mixed $var
* @param string $type
2026-03-30 14:54:57 +07:00
* @throws VarException
*
*/
function settype(&$var, string $type): void
{
error_clear_last();
$safeResult = \settype($var, $type);
if ($safeResult === false) {
throw VarException::createFromPhpError();
}
}