|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-02-13 16:34 UTC] johannes@php.net
-Status: Open
+Status: Wont fix
[2013-02-13 16:34 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 03:00:02 2025 UTC |
Description: ------------ This is a hopefully simple request to add an extra visibility type into classes to allow for paramaters that can be read outside the class like with public but can only be written too inside as with protected. I've put a sample of how I think this should work below to hopefully give you a better idea of this. Test script: --------------- class Test { readonly $param_ro; public funcion test() { $this->param_ro = 'test-ro'; // Works } } $test = new Test(); echo $test->param_ro; // Works $this->param_ro = 'test'; // Fails