<?php class A { final protected function __clone() { throw new Exception("No cloning!"); } } class B extends A { // this should probably not be legal function copy() { return clone $this; } } var_dump((new B)->copy());
You have javascript disabled. You will not be able to edit any code.