mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
20 lines
319 B
PHP
20 lines
319 B
PHP
--TEST--
|
|
ZE2 factory and singleton, test 7
|
|
--FILE--
|
|
<?php
|
|
class test {
|
|
|
|
protected function __clone() {
|
|
}
|
|
}
|
|
|
|
try {
|
|
$obj = new test;
|
|
$clone = clone $obj;
|
|
} catch (Throwable $e) {
|
|
echo $e::class, ": ", $e->getMessage(), PHP_EOL;
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Error: Call to protected method test::__clone() from global scope
|