xref: /PHP-5.3/sapi/cli/tests/005.phpt (revision ce535f18)
1--TEST--
2show information about class
3--SKIPIF--
4<?php
5include "skipif.inc";
6if (!extension_loaded("reflection")) {
7	die("skip reflection extension required");
8}
9?>
10--FILE--
11<?php
12
13$php = getenv('TEST_PHP_EXECUTABLE');
14
15var_dump(`"$php" -n --rc unknown`);
16var_dump(`"$php" -n --rc stdclass`);
17var_dump(`"$php" -n --rc exception`);
18
19echo "Done\n";
20?>
21--EXPECTF--
22string(40) "Exception: Class unknown does not exist
23"
24string(183) "Class [ <internal:Core> class stdClass ] {
25
26  - Constants [0] {
27  }
28
29  - Static properties [0] {
30  }
31
32  - Static methods [0] {
33  }
34
35  - Properties [0] {
36  }
37
38  - Methods [0] {
39  }
40}
41
42"
43string(1355) "Class [ <internal:Core> class Exception ] {
44
45  - Constants [0] {
46  }
47
48  - Static properties [0] {
49  }
50
51  - Static methods [0] {
52  }
53
54  - Properties [7] {
55    Property [ <default> protected $message ]
56    Property [ <default> private $string ]
57    Property [ <default> protected $code ]
58    Property [ <default> protected $file ]
59    Property [ <default> protected $line ]
60    Property [ <default> private $trace ]
61    Property [ <default> private $previous ]
62  }
63
64  - Methods [10] {
65    Method [ <internal:Core> final private method __clone ] {
66    }
67
68    Method [ <internal:Core, ctor> public method __construct ] {
69
70      - Parameters [3] {
71        Parameter #0 [ <optional> $message ]
72        Parameter #1 [ <optional> $code ]
73        Parameter #2 [ <optional> $previous ]
74      }
75    }
76
77    Method [ <internal:Core> final public method getMessage ] {
78    }
79
80    Method [ <internal:Core> final public method getCode ] {
81    }
82
83    Method [ <internal:Core> final public method getFile ] {
84    }
85
86    Method [ <internal:Core> final public method getLine ] {
87    }
88
89    Method [ <internal:Core> final public method getTrace ] {
90    }
91
92    Method [ <internal:Core> final public method getPrevious ] {
93    }
94
95    Method [ <internal:Core> final public method getTraceAsString ] {
96    }
97
98    Method [ <internal:Core> public method __toString ] {
99    }
100  }
101}
102
103"
104Done
105