1--TEST--
2ReflectionClass::__constructor() - bad arguments
3--FILE--
4<?php
5try {
6    var_dump(new ReflectionClass());
7} catch (TypeError $e) {
8    echo $e->getMessage() . "\n";
9}
10
11try {
12    var_dump(new ReflectionClass(null));
13} catch (Exception $e) {
14    echo $e->getMessage() . "\n";
15}
16
17try {
18    var_dump(new ReflectionClass(true));
19} catch (Exception $e) {
20    echo $e->getMessage() . "\n";
21}
22
23try {
24    var_dump(new ReflectionClass(1));
25} catch (Exception $e) {
26    echo $e->getMessage() . "\n";
27}
28
29try {
30    var_dump(new ReflectionClass(array(1,2,3)));
31} catch (TypeError $e) {
32    echo $e->getMessage() . "\n";
33}
34
35try {
36    var_dump(new ReflectionClass("stdClass", 1));
37} catch (TypeError $e) {
38    echo $e->getMessage() . "\n";
39}
40
41try {
42    var_dump(new ReflectionClass("X"));
43} catch (Exception $e) {
44    echo $e->getMessage() . "\n";
45}
46
47?>
48--EXPECTF--
49ReflectionClass::__construct() expects exactly 1 argument, 0 given
50
51Deprecated: ReflectionClass::__construct(): Passing null to parameter #1 ($objectOrClass) of type object|string is deprecated in %s on line %d
52Class "" does not exist
53Class "1" does not exist
54Class "1" does not exist
55ReflectionClass::__construct(): Argument #1 ($objectOrClass) must be of type object|string, array given
56ReflectionClass::__construct() expects exactly 1 argument, 2 given
57Class "X" does not exist
58