You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reflection* classes should prevent being able to be cloned.
--TEST--
Reflection class can not be cloned
--CREDITS--
Stefan Koopmanschap <[email protected]>
TestFest PHP|Tek
--SKIPIF--
<?phpif (!extension_loaded('reflection')) print'skip';
?>
--FILE--
<?phprequire'vendor/autoload.php';
useBetterReflection\Reflector\ClassReflector;
useBetterReflection\SourceLocator\SingleFileSourceLocator;
$reflector = newClassReflector(newSingleFileSourceLocator(__FILE__));
class Foo {
}
$rc = $reflector->reflect("Foo");
$rc2 = clone($rc);
?>
--EXPECTF--
Fatal error: Uncaught Error: Trying to clone an uncloneable object of class ReflectionClass in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
The text was updated successfully, but these errors were encountered:
Reflection* classes should prevent being able to be cloned.
The text was updated successfully, but these errors were encountered: