<?php
//error_reporting(-1);
class test
{
public $a = 123;
public $b = 222;
public $c = 641;
static function php_error_handler ($errno, $errstr, $errfile, $errline, $vars) {
throw new Exception
("\n\n".'['.$errno.'] '.$errstr.' ('.strtr ($errfile, '\\', '/').', '.$errline.')'."\n\n"); /*
if (!empty($errno)) {
echo $errno;
echo "\n";
}
if (!empty($errstr)) {
echo $errstr;
echo "\n";
}
if (!empty($errfile)) {
echo $errfile;
echo "\n";
}
if (!empty($errline)) {
echo $errline;
echo "\n";
}
if (!empty($vars)) {
print_r($vars);
echo "\n";
}
*/
}
public function cry() {
echo $this->a;
echo "\n";
}
public function summ($a, $b) {
return $a + $b;
} else {
return $this->a + $this->b;
}
}
}
$z = new test();
$z->cry();
$z->a = 100;
$z->cry();
$x = $z->summ(0,0);
$y = $z->summ(3, 4);
//error;
PD9waHAKLy9lcnJvcl9yZXBvcnRpbmcoLTEpOwplcnJvcl9yZXBvcnRpbmcgKEVfQUxMIHwgRV9TVFJJQ1QpOwpzZXRfZXJyb3JfaGFuZGxlciAoJ3Rlc3Q6OnBocF9lcnJvcl9oYW5kbGVyJyk7CgoKCmNsYXNzIHRlc3QKewoJcHVibGljICRhID0gMTIzOwoJcHVibGljICRiID0gMjIyOwoJcHVibGljICRjID0gNjQxOwoJCglzdGF0aWMgZnVuY3Rpb24gcGhwX2Vycm9yX2hhbmRsZXIgKCRlcnJubywgJGVycnN0ciwgJGVycmZpbGUsICRlcnJsaW5lLCAkdmFycykgewoJICAgIHRocm93IG5ldyBFeGNlcHRpb24gKCJcblxuIi4nWycuJGVycm5vLiddICcuJGVycnN0ci4nICgnLnN0cnRyICgkZXJyZmlsZSwgJ1xcJywgJy8nKS4nLCAnLiRlcnJsaW5lLicpJy4iXG5cbiIpOwoJCS8qCgkJaWYgKCFlbXB0eSgkZXJybm8pKSB7CgkJCWVjaG8gJGVycm5vOwoJCQllY2hvICJcbiI7CgkJfQoJCWlmICghZW1wdHkoJGVycnN0cikpIHsKCQkJZWNobyAkZXJy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