1--TEST--
2ReflectionClass::getParentClass()
3--CREDITS--
4Robin Fernandes <robinf@php.net>
5Steve Seear <stevseea@php.net>
6--FILE--
7<?php
8class A {}
9class B extends A {}
10
11$rc = new ReflectionClass('B');
12$parent = $rc->getParentClass();
13$grandParent = $parent->getParentClass();
14var_dump($parent, $grandParent);
15
16echo "\nTest bad params:\n";
17var_dump($rc->getParentClass(null));
18var_dump($rc->getParentClass('x'));
19var_dump($rc->getParentClass('x', 123));
20
21?>
22--EXPECTF--
23object(ReflectionClass)#%d (1) {
24  ["name"]=>
25  string(1) "A"
26}
27bool(false)
28
29Test bad params:
30
31Warning: ReflectionClass::getParentClass() expects exactly 0 parameters, 1 given in %s on line %d
32NULL
33
34Warning: ReflectionClass::getParentClass() expects exactly 0 parameters, 1 given in %s on line %d
35NULL
36
37Warning: ReflectionClass::getParentClass() expects exactly 0 parameters, 2 given in %s on line %d
38NULL
39