|
Posted by Vidyut Luther on 08/23/05 18:38
I'm writing a error handler for my scripts, so I went to : http://
us3.php.net/manual/en/function.set-error-handler.php
I noticed something in the example 1 given there.
<?php
myErrorHandler($errno, $errstr, $errfile, $errline)
{
switch ($errno) {
case E_USER_ERROR:
.....
}
?>
and then:
<?php
trigger_error("log(x) for x <= 0 is undefined, you used: scale =
$scale", E_USER_ERROR);
?>
So, wouldn't this make $errno in the "myErrorHandler" be "log
(x) ...." rather than E_USER_ERROR ?
is this a typo on the website ? or am I not understanding how
variables are passed to a function ? I always thought the
variables needed to be passed in the same order as the signature of
the function..
[Back to original message]
|