bug35393.phpt 527 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Bug #35393 (changing static protected members from outside the class)
  3. --INI--
  4. error_reporting=4095
  5. --FILE--
  6. <?php
  7. class ObjectPath
  8. {
  9. static protected $type = array(0=>'main');
  10. static function getType()
  11. {
  12. return self::$type;
  13. }
  14. }
  15. print_r(ObjectPath::getType());
  16. $object_type = array_pop((ObjectPath::getType()));
  17. print_r(ObjectPath::getType());
  18. ?>
  19. --EXPECTF--
  20. Array
  21. (
  22. [0] => main
  23. )
  24. Notice: Only variables should be passed by reference in %sbug35393.php on line 12
  25. Array
  26. (
  27. [0] => main
  28. )