diff options
| author | Stanislav Malyshev <stas@php.net> | 2012-05-12 22:12:48 -0700 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2012-05-14 11:03:21 -0700 |
| commit | d03900dc92af6d47921143f226217eae3ca564b7 (patch) | |
| tree | cac0b3f05f139afa395f4b8ead1a43a4504f128e /Zend/tests/bug61782.phpt | |
| parent | 47db8a9aa19f6e17a1018becf9978315c79a1cb0 (diff) | |
| download | php-git-d03900dc92af6d47921143f226217eae3ca564b7.tar.gz | |
fix bug #61782 - __clone/__destruct do not match other methods when checking access controls
Diffstat (limited to 'Zend/tests/bug61782.phpt')
| -rw-r--r-- | Zend/tests/bug61782.phpt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Zend/tests/bug61782.phpt b/Zend/tests/bug61782.phpt new file mode 100644 index 0000000000..95bf4e6cff --- /dev/null +++ b/Zend/tests/bug61782.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #61782 (__clone/__destruct do not match other methods when checking access controls) +--FILE-- +<?php + abstract class BaseClass { + abstract protected function __clone(); + } + + class MommasBoy extends BaseClass { + protected function __clone() { + echo __METHOD__, "\n"; + } + } + + class LatchkeyKid extends BaseClass { + public function __construct() { + echo 'In ', __CLASS__, ":\n"; + $kid = new MommasBoy(); + $kid = clone $kid; + } + public function __clone() {} + } + + $obj = new LatchkeyKid(); +echo "DONE\n"; +--EXPECT-- +In LatchkeyKid: +MommasBoy::__clone +DONE |
