On Tuesday, 12 July 2016 21:19:00 UTC+1, Larry Garfield wrote:
>
> Eh. You can copy any object, though, with an external clone() call. So
> really, all objects are "copyable", aren't they?
>
> --Larry Garfield
>
You can certainly prevent an object being cloned, unless you mean a more
complex case?
final class A
{
private function __clone() {}
}
$a = new A;
$b = clone $a; // error - Call to private A::__clone() from ...
-Ciaran
--
You received this message because you are subscribed to the Google Groups "PHP
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/9ed74a19-3dea-443c-8c27-88611aaff144%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.