|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #39876 ReflectionParameter::getDeclaringFunction() method not available
Submitted: 2006-12-18 21:16 UTC Modified: 2007-08-17 05:06 UTC
From: bugs at php dot frankkleine dot de Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.2.0 OS:
Private report: No CVE-ID: None
 [2006-12-18 21:16 UTC] bugs at php dot frankkleine dot de
The manual states on that the ReflectionParameter::getDeclaringFunction() method is available since PHP 5.1.3. However this method is neither available in 5.1.4 nor in 5.2.

Reproduce code:
function test1($param) {}
$refParam = new ReflectionParameter('test1', 'param');

Expected result:
  public 'name' => 'test1' (length=5)

Actual result:
Fatal error: Call to undefined method ReflectionParameter::getDeclaringFunction() in E:\php\tests\reflection_parameter.php on line 4


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-19 05:59 UTC] judas dot iscariote at gmail dot com
either the docs needs fixing, or the #if MBO_0 's in php_reflection.c needs to removed ;)
 [2006-12-19 17:26 UTC]
This is the commit that included the MBO_0s:

date: 2006/03/12 17:22:34;  author: helly;  state: Exp;  lines: +66 -10

  . (inactive but tested) Add getDeclaringFunction()
  . (inactive but tested) Add getPosition()

Sadly, no reason is given why these methods are "inactive but tested".
 [2006-12-20 22:21 UTC] bugs at php dot frankkleine dot de
Summary was changed to a wrong title, corrected this.
 [2007-08-17 05:06 UTC]
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

Available as of PHP 5.2.3.
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Nov 19 17:01:26 2018 UTC