[DOC-CVS] [doc-en] master: Add an example of indirectly modifying readonly property

[email protected] (Jakub Vrana)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Jakub Vrana (vrana)
Date: 2025-11-06T14:48:24+01:00

Commit: https://github.com/php/doc-en/commit/801e7a15e8c9ee2d16966487dc9058d992450b46
Raw diff: https://github.com/php/doc-en/commit/801e7a15e8c9ee2d16966487dc9058d992450b46.diff

Add an example of indirectly modifying readonly property

Changed paths:
  M  language/oop5/properties.xml


Diff:

diff --git a/language/oop5/properties.xml b/language/oop5/properties.xml
index 65fbac2f4e63..d88dceb322e5 100644
--- a/language/oop5/properties.xml
+++ b/language/oop5/properties.xml
@@ -300,6 +300,7 @@ $test->i++;
 ++$test->i;
 $test->ary[] = 1;
 $test->ary[0][] = 1;
+unset($test->ary[0]);
 $ref =& $test->i;
 $test->i =& $ref;
 byRef($test->i);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.