php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #30062 Changes to get_class_*
Submitted: 2004-09-11 01:27 UTC Modified: 2004-09-11 02:15 UTC
From: davey@php.net Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 5* OS: *
Private report: No CVE-ID: None
 [2004-09-11 01:27 UTC] davey@php.net
Description:
------------
I was just thinking it might be nice to add an additional argument to the get_class_* functions which takes a bit mask of the T_PRIVATE, T_STATIC etc token constants to define what information you want returned (i.e. only return static public methods)

- Davey

Reproduce code:
---------------
<?php
class foo {
    private function bar() { }
    public function baz() { }
    static public function bat { }
    protected function qux { }
}

var_dump(get_class_methods('foo', T_STATIC & T_PUBLIC));

Expected result:
----------------
array {
    [1] => 'bat'
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-11 02:15 UTC] helly@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Use Reflection API.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 17:01:30 2024 UTC