summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_exceptions.c10
-rw-r--r--sapi/cli/tests/005.phpt11
2 files changed, 4 insertions, 17 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 8330aba632..848e15b855 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -251,15 +251,6 @@ static zend_object *zend_error_exception_new(zend_class_entry *class_type) /* {{
}
/* }}} */
-/* {{{ proto Exception|Error Exception|Error::__clone()
- Clone the exception object */
-ZEND_COLD ZEND_METHOD(exception, __clone)
-{
- /* Should never be executable */
- zend_throw_exception(NULL, "Cannot clone object using __clone()", 0);
-}
-/* }}} */
-
/* {{{ proto Exception|Error::__construct(string message, int code [, Throwable previous])
Exception constructor */
ZEND_METHOD(exception, __construct)
@@ -772,7 +763,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_exception___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
static const zend_function_entry default_exception_functions[] = {
- ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC)
ZEND_ME(exception, __wakeup, NULL, ZEND_ACC_PUBLIC)
ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
diff --git a/sapi/cli/tests/005.phpt b/sapi/cli/tests/005.phpt
index 0a366b6975..f02014a304 100644
--- a/sapi/cli/tests/005.phpt
+++ b/sapi/cli/tests/005.phpt
@@ -15,10 +15,10 @@ var_dump(`"$php" -n --rc exception`);
echo "Done\n";
?>
---EXPECT--
+--EXPECTF--
string(40) "Exception: Class unknown does not exist
"
-string(183) "Class [ <internal:Core> class stdClass ] {
+string(%d) "Class [ <internal:Core> class stdClass ] {
- Constants [0] {
}
@@ -37,7 +37,7 @@ string(183) "Class [ <internal:Core> class stdClass ] {
}
"
-string(1607) "Class [ <internal:Core> class Exception implements Throwable ] {
+string(%d) "Class [ <internal:Core> class Exception implements Throwable ] {
- Constants [0] {
}
@@ -58,10 +58,7 @@ string(1607) "Class [ <internal:Core> class Exception implements Throwable ] {
Property [ <default> private $previous ]
}
- - Methods [11] {
- Method [ <internal:Core> final private method __clone ] {
- }
-
+ - Methods [10] {
Method [ <internal:Core, ctor> public method __construct ] {
- Parameters [3] {