php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #15134 private modifier for class methods
Submitted: 2002-01-21 00:18 UTC Modified: 2002-01-21 01:00 UTC
From: tysonlt at SPAMSUCKS dot hotmail dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.1.1 OS: Redhat Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tysonlt at SPAMSUCKS dot hotmail dot com
New email:
PHP Version: OS:

 

 [2002-01-21 00:18 UTC] tysonlt at SPAMSUCKS dot hotmail dot com
ok,

I know that class support is only a courtesy, and it's not supposed to be complete, etc etc. BUT...

would it be possible to allow us to declare class methods as private? This is the biggest thing missing to me, apart from overloading which is being addressed.

Unless of course it would hugely affect performance.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-21 01:00 UTC] daniel@php.net
A better OO support will come with Zend 2.0 (i.e. with the next major release of PHP). have a look at zend.com, there's some documentation about it there.

The only thing you can do NOW is to add a comment which suggests to the user not to use this variable/function:

/* private: moo moo */
function moo() {

}

Kind Regards,
  Daniel Lorch
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 20:01:35 2025 UTC