1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 00:32:23 +01:00
Files
archived-php-src/sapi/cli/tests/005.phpt
Nikita Popov d0fd2be642 Revert removal of private __clone() methods
I thought these were redundant, because we already NULL out the
clone_obj object handler. However, it turns out that reflection is
using private __clone() to determine clonability (isCloneable) for
the case where we only have a class, rather than an object.

As such, removing these methods would be a BC break.

This reverts commit e7131a4e9f.
This reverts commit 55bd88ce0d.
2019-01-14 09:19:30 +01:00

105 lines
2.1 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(1607) "Class [ <internal:Core> class Exception implements Throwable ] {
- 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 ] {
}
Method [ <internal:Core, ctor> public method __construct ] {
- Parameters [3] {
Parameter #0 [ <optional> $message ]
Parameter #1 [ <optional> $code ]
Parameter #2 [ <optional> $previous ]
}
}
Method [ <internal:Core> public method __wakeup ] {
}
Method [ <internal:Core, prototype Throwable> final public method getMessage ] {
}
Method [ <internal:Core, prototype Throwable> final public method getCode ] {
}
Method [ <internal:Core, prototype Throwable> final public method getFile ] {
}
Method [ <internal:Core, prototype Throwable> final public method getLine ] {
}
Method [ <internal:Core, prototype Throwable> final public method getTrace ] {
}
Method [ <internal:Core, prototype Throwable> final public method getPrevious ] {
}
Method [ <internal:Core, prototype Throwable> final public method getTraceAsString ] {
}
Method [ <internal:Core, prototype Throwable> public method __toString ] {
}
}
}
"
Done