From: redeye at erisx dot de
Operating system: *
PHP version: 5.0.0b2 (beta2)
PHP Bug Type: Zend Engine 2 problem
Bug description: Incorrect behaviour of PPP using get_class_methods([obj]);
Description:
------------
Calling get_class_methods([obj]); on an object returns next to public
methods it's private and protected methods. I guess those methods should
only be returned when calling get_class_methods($this); within an object.
Reproduce code:
---------------
<pre><?php
class test {
public function pub_function() {
// some code
}
private function priv_function() {
// some code
}
}
$test = new test;
$arry = get_class_methods($test);
foreach ( $arry AS $n => $method_name ) {
echo $n." -> ".$method_name."\n";
}
?></pre>
Expected result:
----------------
empty page :-)
Actual result:
--------------
0 -> pub_function
1 -> priv_function
--
Edit bug report at http://bugs.php.net/?id=26691&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26691&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26691&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26691&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26691&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26691&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26691&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26691&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26691&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26691&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26691&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26691&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26691&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26691&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26691&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26691&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26691&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26691&r=float