don't use $this->error as your argument within a class method.
It has local scope, so just $myarg, and then you can reference $this->myerror inside the function (or not pass it an arg at all in this case.
R
<?
header("Content-type: text/plain");
echo "\n\n\n\n";
error_reporting(31);
$err = 'ito';
/ class MyError {
var $myerror;
function MyError() {
$this->myerror=88;
return $this->myerror;
}
function Errormessg($this->myerror) {
echo(" NOT ERROR ONE");
}
} /
class MyError {
var $myerror;
function MyError() {
$this->myerror=88;
}
function Errormessg($myarg) {
$this->myerror=$myarg;
}
}
$err = new MyError;
echo "result:".$err->myerror." ";
$err->Errormessg(99);
echo "New result:".$err->myerror." ";
?>