Hello !
During french PHP test fest, i have tested
ReflectionMethod::getPrototype(), and the result is... strange.
This is the PHPT file :
--TEST--
--FILE--
<?php
class Hello {
public function sayHelloTo($name) {}
}
class HelloWorld extends Hello {
public function sayHelloTo($name) {}
}
$reflectionMethod = new ReflectionMethod('HelloWorld', 'sayHelloTo');
$prototype = $reflectionMethod->getPrototype();
echo $prototype->class . '::' . $prototype->name;
?>
--EXPECT--
Hello::sayHelloTo
In my opinion, result is strange because i'm expecting
HelloWorld::sayHelloTo instead of Hello::sayHelloTo.
More strange, if i'm using 'Hello' as class instead of 'HelloWorld' as
first argument of ReflectionMethod constructor,
ReflectionMethod::getPrototype() throw an exception because for PHP,
Hello::sayHelloTo() method has no prototype...
So, i think there is a problem.
Your opinion ?
Best regards,
Fred
--
========================================================================
Frédéric Hardy : Architecte d'application/Admin. système/Ergonome
Status : En recherche d'emploi
CV : http://blog.mageekbox.net/public/cv.frederic.hardy.pdf
Blog : http://blog.mageekbox.net
Twitter : http://twitter.com/mageekguy
========================================================================
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php