[wp-hackers] looking for opinions on php5-only plugins
Silverstein, Jesse
Jesse.Silverstein at xerox.com
Thu Oct 8 00:24:53 UTC 2009
> like Otto mentioned before, you could check for PHP5 support before
allowing the plugin to be activated.
>
> Cheers, Coen
>> Version number checking is a bad idea. It's simply not accurate
enough
>> and doesn't tell you what you need to know.
>>
>> Checking for extensions, or functions provided by extensions (using
>> function_exists or class_exists, etc) is much more accurate and sure
>> to work. That's what I check for in the activation checks, whenever a
>> plugin depends on something that somebody might not have.
>>
>
> +1
>
> All checks should be for the functionality you need not what version
of software you are running on.
> westi
These two do not mesh, that is my point. In the case of class constants,
is it acceptable to simply check the PHP version number, or is there a
way (similar to, or using function_exists/class_exists) to check for the
specific functionality that I need.
Jesse
-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Coen
Jacobs
Sent: Wednesday, October 07, 2009 8:21 PM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] looking for opinions on php5-only plugins
like Otto mentioned before, you could check for PHP5 support before
allowing
the plugin to be activated.
Cheers, Coen
Sent from my Android mobile.
On 8 Oct 2009 02:16, "Silverstein, Jesse" <Jesse.Silverstein at xerox.com>
wrote:
Along these lines, is there an easy/safe way to check if a const
variable in a class will be accessed properly, versus throwing a fatal
error? It seems like some_method(ClassName::CONST_VAR); will throw a
fatal error in PHP 4 (I'm assuming because class constants are not
supported in 4). So, instead of checking for PHP version 5 or greater,
how would I check specifically for constant variable support?
-----Original Message----- From:
wp-hackers-bounces at lists.automattic.com[mailto:
wp-hackers-bounces...
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.421 / Virus Database: 270.14.5/2418 - Release Date:
10/07/09 05:18:00
_______________________________________________ wp-hackers mailing list
wp-hackers at lists.automattic....
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.421 / Virus Database: 270.14.5/2418 - Release Date:
10/07/09 20:49:00
More information about the wp-hackers
mailing list