TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Advanced PHP Programming (http://www.talkphp.com/advanced-php-programming/)
-   -   SALATHE!!! Reflection class? (http://www.talkphp.com/advanced-php-programming/3190-salathe-reflection-class.html)

delayedinsanity 07-29-2008 09:10 PM

SALATHE!!! Reflection class?
 
Great time for you to be on vacation buddy! Maybe Kalle or somebody knows... I use PHPs built in reflection class in my registry pattern, but I just got an email from somebody who tried to install my package and got:

Fatal error: Call to undefined method ReflectionClass::newInstanceArgs() in /var/www/html/bin/lib/tuatara.class.php on line 200

The installer won't permit the user to install if they're not running php 5 (tested via version_compare(PHP_VERSION, '5.0.0', '>')) so I know it's not because they're running 4. Is there an early release of PHP 5 that didn't include the reflection API by chance? I checked the docs and it just says PHP 5, no specific version on when it came in.

I don't know what to tell this person, but if there's a specific version of 5 where Reflection was included, I need to know so I can update my installer.
-m

Kalle 07-29-2008 09:32 PM

PHP.net tells it all:

Quote:

Originally Posted by http://www.php.net/language.oop5.reflection
Note: hasConstant(), hasMethod(), hasProperty(), getStaticPropertyValue() and setStaticPropertyValue() were added in PHP 5.1.0, while newInstanceArgs() was added in PHP 5.1.3.

Its the only reason I could see why =)

delayedinsanity 07-29-2008 09:37 PM

Damnit that's where I was looking too, and I didn't read to the end of the line.



All times are GMT. The time now is 03:53 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0