ID: 31788
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Wont fix
-Bug Type: Zend Engine 2 problem
+Bug Type: Feature/Change Request
Operating System: Irrelevant
PHP Version: 5.0.3
New Comment:
Not a bug, this is how it was meant. Changing to a Feature Request and
close it as "Wont fix" as changing this will break scripts.
Previous Comments:
------------------------------------------------------------------------
[2005-02-01 03:25:44] [EMAIL PROTECTED]
Description:
------------
The magic methods __get, __set, __call and __clone (and maybe others
too) cannot be set as private methods when clearly, this is what they
should be. They should not be called from outside of the object except
by the engine which shouldn't count.
Allowing public access to these could cause users to start using them.
- Davey
Reproduce code:
---------------
<?php
class foo {
private function __get($var)
{
echo __FUNCTION__ . ' called';
}
}
$foo = new foo;
$foo->bar;
?>
Expected result:
----------------
__get called
Actual result:
--------------
<b>Fatal error</b>: Call to private method foo::__get() from context
'' in <b>PHPDocument2</b> on line <b>22</b><br />
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31788&edit=1