Edit report at https://bugs.php.net/bug.php?id=79206&edit=1
ID: 79206
Updated by: cmb@php.net
Reported by: greedy dot ivan at gmail dot com
Summary: More typed properties docs: uninitialized state,
behavior with __get/set, etc.
-Status: Feedback
+Status: Closed
Type: Documentation Problem
Package: Class/Object related
PHP Version: 7.4.2
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Fine. Closing.
Previous Comments:
------------------------------------------------------------------------
[2021-08-23 09:25:40] greedy dot ivan at gmail dot com
agreed
------------------------------------------------------------------------
[2021-08-22 20:47:49] requinix@php.net
I'm satisfied with the updated documentation. @ivan?
------------------------------------------------------------------------
[2021-08-22 17:08:10] deleugyn+php at gmail dot com
Looks like https://www.php.net/manual/en/language.oop5.properties.php#language.oop5.properties.typed-properties
describes how typed properties work and there's an example of how Error is thrown for
unitilialized properties.
Perhaps this can be closed?
------------------------------------------------------------------------
[2020-02-01 23:22:59] requinix@php.net
> Maybe PHP RFC page needs some disclaimer that implementation details may differ from what in on
> the RFC page> itself.
1. Everything in the RFC is supposed to be correct and the implementation should not differ. What
likely happened here is that the mailing list discussion resulted in the error being changed to an
Error and the author forgot to update the RFC. Typed properties was a complicated subject to talk
about.
2. The RFC is not supposed to act as documentation. The manual proper should cover everything. If
there is no documentation then that is a problem.
And I don't see sufficient documentation. What's there now is just an example of the
syntax.
https://www.php.net/manual/en/language.oop5.properties.php
------------------------------------------------------------------------
[2020-02-01 22:55:11] greedy dot ivan at gmail dot com
> Regarding the RFC itself, it is not the final documentation
Thank you for this clarification.
PHP docs contains almost nothing about typed property feature and how it works. All references in
Internet goes to that RFC. So, it is assumed that reading implemented PHP RFC is a good point to
know how feature works and many details about it.
Maybe PHP RFC page needs some disclaimer that implementation details may differ from what in on the
RFC page itself.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=79206
--
Edit this bug report at https://bugs.php.net/bug.php?id=79206&edit=1