1--TEST--
2ReflectionClass::getStaticPropertyValue() - bad params
3--CREDITS--
4Robin Fernandes <robinf@php.net>
5Steve Seear <stevseea@php.net>
6--FILE--
7<?php
8class C {
9	public static $x;
10}
11
12$rc = new ReflectionClass('C');
13try {
14	var_dump($rc->getStaticPropertyValue("x", "default value", 'blah'));
15} catch (Exception $e) {
16	echo $e->getMessage() . "\n";
17}
18try {
19	var_dump($rc->getStaticPropertyValue());
20} catch (Exception $e) {
21	echo $e->getMessage() . "\n";
22}
23try {
24	var_dump($rc->getStaticPropertyValue(null));
25} catch (Exception $e) {
26	echo $e->getMessage() . "\n";
27}
28try {
29	var_dump($rc->getStaticPropertyValue(1.5, 'def'));
30} catch (Exception $e) {
31	echo $e->getMessage() . "\n";
32}
33try {
34	var_dump($rc->getStaticPropertyValue(array(1,2,3)));
35} catch (Exception $e) {
36	echo $e->getMessage() . "\n";
37}
38
39
40?>
41--EXPECTF--
42Warning: ReflectionClass::getStaticPropertyValue() expects at most 2 parameters, 3 given in %s on line 8
43NULL
44
45Warning: ReflectionClass::getStaticPropertyValue() expects at least 1 parameter, 0 given in %s on line 13
46NULL
47Class C does not have a property named
48string(3) "def"
49
50Warning: ReflectionClass::getStaticPropertyValue() expects parameter 1 to be string, array given in %s on line 28
51NULL
52