|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2016-08-19 03:14 UTC] laruence@php.net
[2018-08-15 17:49 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2018-08-15 17:49 UTC] cmb@php.net
[2019-09-08 09:48 UTC] jhdxr@php.net
[2019-09-09 15:30 UTC] nikic@php.net
[2019-09-09 15:30 UTC] nikic@php.net
-Status: Verified
+Status: Closed
[2019-09-09 17:14 UTC] jhdxr@php.net
-Assigned To:
+Assigned To: jhdxr
[2019-09-09 17:14 UTC] jhdxr@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 12 22:00:01 2025 UTC |
Description: ------------ An SplFileObject is clonable according to reflection, but errs on attempting to clone. Related bug report: 53967 Test script: --------------- $x=new SplFileObject("tests.php"); $r=new ReflectionObject($x); var_dump($r->isCloneable()); $y=clone $x; //fatal error Expected result: ---------------- At worst, such things should issue a warning. This clone might happen as part of more general clone that involves many objects and arrays, and with a fatal error there is no way to recover from this, but it is not a big deal and should be recoverable. Changing it to E_WARNING is a possible scenario, or throwing appropriate exceptions on PHP 7. Also, note in the documentation that reflection stats are not accurate regarding core classes and functions. Actual result: -------------- make cloneable, return false, or E_WARNING