From:             [EMAIL PROTECTED]
Operating system: Gentoo
PHP version:      5.2.2
PHP Bug Type:     Class/Object related
Bug description:  ReflectionParameter::getPosition() not available

Description:
------------
The reflection documentation states that there is a method getPosition()
on instances of ReflectionParameter since 5.1.3, but it does not exist (at
least here).

Reproduce code:
---------------
[EMAIL PROTECTED] ~ $ php -a
Interactive shell

php > function foo($param) {}
php > $fkt = new ReflectionFunction("foo");
php > $pars = $fkt->getParameters();
php > $par = $pars[0];
php > var_dump($par->getPosition());

-------------------------------------------------------

[EMAIL PROTECTED] ~ $ php -a
Interactive shell

php > var_dump(get_class_methods("ReflectionParameter"));


Actual result:
--------------
Fatal error: Call to undefined method ReflectionParameter::getPosition()
in php shell code on line 1

Call Stack:
   60.5766      68372   1. {main}() php shell code:0


-------------------------------------------------------

array(12) {
  [0]=>
  string(6) "export"
  [1]=>
  string(11) "__construct"
  [2]=>
  string(10) "__toString"
  [3]=>
  string(7) "getName"
  [4]=>
  string(19) "isPassedByReference"
  [5]=>
  string(17) "getDeclaringClass"
  [6]=>
  string(8) "getClass"
  [7]=>
  string(7) "isArray"
  [8]=>
  string(10) "allowsNull"
  [9]=>
  string(10) "isOptional"
  [10]=>
  string(23) "isDefaultValueAvailable"
  [11]=>
  string(15) "getDefaultValue"
}


-- 
Edit bug report at http://bugs.php.net/?id=41525&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41525&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41525&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41525&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41525&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=41525&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41525&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41525&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41525&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41525&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41525&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=41525&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=41525&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41525&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41525&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41525&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41525&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41525&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41525&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41525&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41525&r=mysqlcfg

Reply via email to