1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 10:12:18 +01:00
Files
archived-php-src/sapi/cli/tests/005.phpt
2020-03-02 15:25:32 +01:00

136 lines
2.5 KiB
PHP

--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(40) "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(2008) "Class [ <internal:Core> class Exception implements Throwable, Stringable ] {
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [7] {
Property [ <default> protected $message ]
Property [ <default> private $string ]
Property [ <default> protected $code ]
Property [ <default> protected $file ]
Property [ <default> protected $line ]
Property [ <default> private $trace ]
Property [ <default> private $previous ]
}
- Methods [11] {
Method [ <internal:Core> final private method __clone ] {
- Parameters [0] {
}
}
Method [ <internal:Core, ctor> public method __construct ] {
- Parameters [3] {
Parameter #0 [ <optional> string $message ]
Parameter #1 [ <optional> int $code ]
Parameter #2 [ <optional> ?Throwable $previous ]
}
}
Method [ <internal:Core> public method __wakeup ] {
- Parameters [0] {
}
}
Method [ <internal:Core, prototype Throwable> final public method getMessage ] {
- Parameters [0] {
}
}
Method [ <internal:Core, prototype Throwable> final public method getCode ] {
- Parameters [0] {
}
}
Method [ <internal:Core, prototype Throwable> final public method getFile ] {
- Parameters [0] {
}
}
Method [ <internal:Core, prototype Throwable> final public method getLine ] {
- Parameters [0] {
}
}
Method [ <internal:Core, prototype Throwable> final public method getTrace ] {
- Parameters [0] {
}
}
Method [ <internal:Core, prototype Throwable> final public method getPrevious ] {
- Parameters [0] {
}
}
Method [ <internal:Core, prototype Throwable> final public method getTraceAsString ] {
- Parameters [0] {
}
}
Method [ <internal:Core, prototype Stringable> public method __toString ] {
- Parameters [0] {
}
- Return [ string ]
}
}
}
"
Done