error_reporting05.phpt 518 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. testing @ and error_reporting - 5
  3. --FILE--
  4. <?php
  5. error_reporting(E_ALL);
  6. class test {
  7. function __get($name) {
  8. return $undef_name;
  9. }
  10. function __set($name, $value) {
  11. return $undef_value;
  12. }
  13. }
  14. $test = new test;
  15. $test->abc = 123;
  16. echo $test->bcd;
  17. @$test->qwe = 123;
  18. echo @$test->wer;
  19. var_dump(error_reporting());
  20. echo "Done\n";
  21. ?>
  22. --EXPECTF--
  23. Warning: Undefined variable $undef_value in %s on line %d
  24. Warning: Undefined variable $undef_name in %s on line %d
  25. int(32767)
  26. Done