xref: /PHP-7.2/tests/classes/clone_005.phpt (revision 610c7fbe)
1--TEST--
2ZE2 object cloning, 5
3--FILE--
4<?php
5abstract class base {
6  public $a = 'base';
7
8  // disallow cloning once forever
9  final private function __clone() {}
10}
11
12class test extends base {
13  // reenabling should fail
14  public function __clone() {}
15}
16
17?>
18--EXPECTF--
19Fatal error: Cannot override final method base::__clone() in %sclone_005.php on line %d
20