xref: /PHP-5.5/Zend/tests/bug32296.phpt (revision 610c7fbe)
1--TEST--
2Bug #32296 (get_class_methods output has changed between 5.0.2 and 5.0.3)
3--FILE--
4<?php
5abstract class space{
6	function __construct(){}
7	abstract protected function unfold();
8}
9
10abstract class shape extends space{
11	private function x1() {}
12	protected final function unfold(){}
13}
14
15abstract 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
28class square extends quad{}
29
30$a = new square();
31$a->buggy();
32print_r(get_class_methods("square"));
33print_r(get_class_methods($a));
34?>
35--EXPECT--
36square
37a:Array
38(
39    [0] => x2
40    [1] => buggy
41    [2] => unfold
42    [3] => __construct
43)
44b:Array
45(
46    [0] => x2
47    [1] => buggy
48    [2] => unfold
49    [3] => __construct
50)
51Array
52(
53    [0] => buggy
54    [1] => __construct
55)
56Array
57(
58    [0] => buggy
59    [1] => __construct
60)
61