Annotation of embedaddon/php/Zend/tests/objects_025.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Testing invalid method names with __call and __callstatic
! 3: --FILE--
! 4: <?php
! 5:
! 6: class foo {
! 7: public function __call($a, $b) {
! 8: print "non-static - ok\n";
! 9: }
! 10:
! 11: public static function __callstatic($a, $b) {
! 12: print "static - ok\n";
! 13: }
! 14: }
! 15:
! 16: $a = new foo;
! 17: $a->foooo();
! 18: $a::foooo();
! 19:
! 20: $b = 'aaaaa1';
! 21: $a->$b();
! 22: $a::$b();
! 23:
! 24: $b = ' ';
! 25: $a->$b();
! 26: $a::$b();
! 27:
! 28: $b = str_repeat('a', 10000);
! 29: $a->$b();
! 30: $a::$b();
! 31:
! 32: $b = NULL;
! 33: $a->$b();
! 34:
! 35: ?>
! 36: --EXPECTF--
! 37: non-static - ok
! 38: static - ok
! 39: non-static - ok
! 40: static - ok
! 41: non-static - ok
! 42: static - ok
! 43: non-static - ok
! 44: static - ok
! 45:
! 46: Fatal error: Method name must be a string in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>