#46058 [Com]: ReflectionMethod::invoke - wrong behavior

From: Date: Tue, 21 Apr 2009 07:59:02 +0000
Subject: #46058 [Com]: ReflectionMethod::invoke - wrong behavior
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-136064@lists.php.net to get a copy of this message
ID: 46058 Comment by: dypa at bk dot ru Reported By: felipe@php.net Status: Open Bug Type: Reflection related Operating System: * PHP Version: 5.2CVS-2008-09-11 (CVS) New Comment: 5.2.9-2 Windows NT DYPA 5.1 build 2600 Fatal error: Non-static method ReflectionFunction::trim() cannot be called statically Previous Comments: ------------------------------------------------------------------------ [2008-09-11 19:40:09] felipe@php.net Description: ------------ Currently the behavior is different of 5.3 and HEAD. Note also: the method name in the warning message. Reproduce code: --------------- <?php $x = new ReflectionMethod('reflectionfunction', 'invoke'); var_dump($x->invokeArgs(new ReflectionFunction('trim'), array(' foobar '))); Expected result: ---------------- string(6) "foobar" Actual result: -------------- Fatal error: Non-static method ReflectionFunction::trim() cannot be called statically in %s on line %d ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46058&edit=1

« previous php.bugs (#136064) next »