diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /Zend/tests/get_class_methods_003.phpt | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'Zend/tests/get_class_methods_003.phpt')
-rw-r--r-- | Zend/tests/get_class_methods_003.phpt | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/Zend/tests/get_class_methods_003.phpt b/Zend/tests/get_class_methods_003.phpt new file mode 100644 index 0000000..bbb7586 --- /dev/null +++ b/Zend/tests/get_class_methods_003.phpt @@ -0,0 +1,78 @@ +--TEST-- +get_class_methods(): Testing scope +--FILE-- +<?php + +interface A { + function aa(); + function bb(); + static function cc(); +} + +class C { + public function a() { } + protected function b() { } + private function c() { } + + static public function static_a() { } + static protected function static_b() { } + static private function static_c() { } +} + +class B extends C implements A { + public function aa() { } + public function bb() { } + + static function cc() { } + + public function __construct() { + var_dump(get_class_methods('A')); + var_dump(get_class_methods('B')); + var_dump(get_class_methods('C')); + } + + public function __destruct() { } +} + +new B; + +?> +--EXPECT-- +array(3) { + [0]=> + string(2) "aa" + [1]=> + string(2) "bb" + [2]=> + string(2) "cc" +} +array(9) { + [0]=> + string(2) "aa" + [1]=> + string(2) "bb" + [2]=> + string(2) "cc" + [3]=> + string(11) "__construct" + [4]=> + string(10) "__destruct" + [5]=> + string(1) "a" + [6]=> + string(1) "b" + [7]=> + string(8) "static_a" + [8]=> + string(8) "static_b" +} +array(4) { + [0]=> + string(1) "a" + [1]=> + string(1) "b" + [2]=> + string(8) "static_a" + [3]=> + string(8) "static_b" +} |