File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug61782.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:17 2013 UTC (11 years, 8 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>