bug24436.phpt 508 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #24436 (isset()/empty() produce errors with non-existent variables in classes)
  3. --INI--
  4. error_reporting=2047
  5. --FILE--
  6. <?php
  7. class test {
  8. function __construct() {
  9. if (empty($this->test[0][0])) { print "test1\n";}
  10. if (!isset($this->test[0][0])) { print "test2\n";}
  11. if (empty($this->test)) { print "test1\n";}
  12. if (!isset($this->test)) { print "test2\n";}
  13. }
  14. }
  15. $test1 = new test();
  16. ?>
  17. --EXPECT--
  18. test1
  19. test2
  20. test1
  21. test2