php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch magic-method-must-constant for Class/Object related Bug #65042

Patch version 2018-12-30 14:50 UTC

Return to Bug #65042 | Download this patch
Patch Revisions:

Developer: girgias@php.net

--- en/language/oop5/magic.xml
+++ en/language/oop5/magic.xml
@@ -25,6 +25,12 @@
    with them.
   </para>
 
+  <note>
+   <simpara>
+    All magic methods <emphasis>MUST</emphasis> be declared as <literal>public</literal>
+   </simpara>
+  </note>
+
   <caution>
    <simpara>
     PHP reserves all function names starting with __ as magical.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC