我正在尝试创建自己的错误处理程序:
function errHandler($errNo, $errStr, $errFile, $errLine, $errContext) {
echo $errno . "\n";
echo $errstr . "\n";
}
set_error_handler("errHandler");
var a;
此代码不起作用。我收到默认错误:
PHP Parse error: syntax error, unexpected 'var' (T_VAR), expecting end of file in /var/www/php-sockets/index.php on line 15
那么我做得不正确或应该添加什么?