try {
$str = 'Hello World';
$result = lcfirst($str);
echo $result;
} catch (Error $e) {
echo 'Error: ' . $e->getMessage();
}
function customError($errno, $errstr) {
echo "Error: [$errno] $errstr";
}
set_error_handler("customError");
$str = 'Hello World';
$result = lcfirst($str);
echo $result;
$str = 'Hello World';
$result = @lcfirst($str);
if ($result === false) {
echo 'Error: lcfirst function failed';
} else {
echo $result;
}
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>