no_static_arg_binding.phpt 374 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Don't statically bind arguments for self:: calls in traits
  3. --FILE--
  4. <?php
  5. trait T {
  6. public static function method($arg) {
  7. }
  8. public static function call() {
  9. $i = 0;
  10. self::method($i);
  11. var_dump($i);
  12. }
  13. }
  14. class C {
  15. use T;
  16. public static function method(&$arg) {
  17. $arg++;
  18. }
  19. }
  20. C::call();
  21. ?>
  22. --EXPECT--
  23. int(1)