Annotation of embedaddon/php/Zend/tests/magic_methods_001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Testing several magic methods
! 3: --FILE--
! 4: <?php
! 5:
! 6: class foo {
! 7: function __unset($a) {
! 8: print "unset\n";
! 9: var_dump($a);
! 10: }
! 11:
! 12: public function __call($a, $b) {
! 13: print "call\n";
! 14: var_dump($a);
! 15: }
! 16: function __clone() {
! 17: print "clone\n";
! 18: }
! 19: static public function __callstatic($a, $b) {
! 20: print "callstatic\n";
! 21: }
! 22:
! 23: public function __tostring() {
! 24: return 'foo';
! 25: }
! 26: }
! 27:
! 28:
! 29: $a = new foo;
! 30:
! 31: $a->sdfdsa();
! 32:
! 33: $a::test();
! 34:
! 35: clone $a;
! 36:
! 37: var_dump((string)$a);
! 38:
! 39: unset($a->a);
! 40:
! 41: ?>
! 42: --EXPECT--
! 43: call
! 44: string(6) "sdfdsa"
! 45: callstatic
! 46: clone
! 47: string(3) "foo"
! 48: unset
! 49: string(1) "a"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>