Annotation of embedaddon/php/Zend/tests/bug32296.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #32296 (get_class_methods output has changed between 5.0.2 and 5.0.3)
                      3: --FILE--
                      4: <?php
                      5: abstract class space{
                      6:        function __construct(){}
                      7:        abstract protected function unfold();
                      8: }
                      9: 
                     10: abstract class shape extends space{
                     11:        private function x1() {}
                     12:        protected final function unfold(){}
                     13: }
                     14: 
                     15: abstract class quad extends shape{
                     16:        private function x2() {}
                     17:        function buggy(){
                     18:                $c = get_class($this);
                     19:                $a = get_class_methods(get_class($this));
                     20:                $b = get_class_methods($this);
                     21:                print($c."\n".'a:');
                     22:                print_r($a);
                     23:                print('b:');
                     24:                print_r($b);
                     25:        }
                     26: }
                     27: 
                     28: class square extends quad{}
                     29: 
                     30: $a = new square();
                     31: $a->buggy();
                     32: print_r(get_class_methods("square"));
                     33: print_r(get_class_methods($a));
                     34: ?>
                     35: --EXPECT--
                     36: square
                     37: a:Array
                     38: (
                     39:     [0] => x2
                     40:     [1] => buggy
                     41:     [2] => unfold
                     42:     [3] => __construct
                     43: )
                     44: b:Array
                     45: (
                     46:     [0] => x2
                     47:     [1] => buggy
                     48:     [2] => unfold
                     49:     [3] => __construct
                     50: )
                     51: Array
                     52: (
                     53:     [0] => buggy
                     54:     [1] => __construct
                     55: )
                     56: Array
                     57: (
                     58:     [0] => buggy
                     59:     [1] => __construct
                     60: )

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>