123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- --TEST--
- show information about class
- --SKIPIF--
- <?php
- include "skipif.inc";
- ?>
- --FILE--
- <?php
- $php = getenv('TEST_PHP_EXECUTABLE');
- var_dump(`"$php" -n --rc unknown`);
- var_dump(`"$php" -n --rc stdclass`);
- var_dump(`"$php" -n --rc exception`);
- echo "Done\n";
- ?>
- --EXPECT--
- string(42) "Exception: Class "unknown" does not exist
- "
- string(183) "Class [ <internal:Core> class stdClass ] {
- - Constants [0] {
- }
- - Static properties [0] {
- }
- - Static methods [0] {
- }
- - Properties [0] {
- }
- - Methods [0] {
- }
- }
- "
- string(2232) "Class [ <internal:Core> class Exception implements Stringable, Throwable ] {
- - Constants [0] {
- }
- - Static properties [0] {
- }
- - Static methods [0] {
- }
- - Properties [7] {
- Property [ protected $message = '' ]
- Property [ private string $string = '' ]
- Property [ protected $code = 0 ]
- Property [ protected string $file = '' ]
- Property [ protected int $line = 0 ]
- Property [ private array $trace = [] ]
- Property [ private ?Throwable $previous = NULL ]
- }
- - Methods [11] {
- Method [ <internal:Core> private method __clone ] {
- - Parameters [0] {
- }
- - Return [ void ]
- }
- Method [ <internal:Core, ctor> public method __construct ] {
- - Parameters [3] {
- Parameter #0 [ <optional> string $message = "" ]
- Parameter #1 [ <optional> int $code = 0 ]
- Parameter #2 [ <optional> ?Throwable $previous = null ]
- }
- }
- Method [ <internal:Core> public method __wakeup ] {
- - Parameters [0] {
- }
- - Tentative return [ void ]
- }
- Method [ <internal:Core, prototype Throwable> final public method getMessage ] {
- - Parameters [0] {
- }
- - Return [ string ]
- }
- Method [ <internal:Core, prototype Throwable> final public method getCode ] {
- - Parameters [0] {
- }
- }
- Method [ <internal:Core, prototype Throwable> final public method getFile ] {
- - Parameters [0] {
- }
- - Return [ string ]
- }
- Method [ <internal:Core, prototype Throwable> final public method getLine ] {
- - Parameters [0] {
- }
- - Return [ int ]
- }
- Method [ <internal:Core, prototype Throwable> final public method getTrace ] {
- - Parameters [0] {
- }
- - Return [ array ]
- }
- Method [ <internal:Core, prototype Throwable> final public method getPrevious ] {
- - Parameters [0] {
- }
- - Return [ ?Throwable ]
- }
- Method [ <internal:Core, prototype Throwable> final public method getTraceAsString ] {
- - Parameters [0] {
- }
- - Return [ string ]
- }
- Method [ <internal:Core, prototype Stringable> public method __toString ] {
- - Parameters [0] {
- }
- - Return [ string ]
- }
- }
- }
- "
- Done
|