|
|
|
| Title : |
PHP version number as an integer for determining what
features are enabled |
| Categories : |
PHP |
 Mike Grier |
| Date : |
Apr 15th 1999 |
| Grade : |
1 of 5 (graded 1 times) |
| Viewed : |
2619 |
| File : |
No file for this code example. |
| Images : |
No Images for this code example. |
|
| Search : |
More code by Mike Grier |
|
| Action : |
Grade This Code Example
|
|
| Tools : |
My Examples List |
|
|
|
|
|
|
<?php
/* This example prints the version of php as an integer.
* This is useful for determining if features requiring
* a certain version are enabled, i.e. if $phpver >= 304
* then day of the month without leading zero is enabled.
*
* intval is necessary in case a portion contains a string,
* such as in the example given above
*/
$temp = explode(".", phpversion());
$num = count($temp);
$phpver = 0;
switch ($num)
{
case 3:
$phpver = $phpver + (intval($temp[2]));
case 2:
$phpver = $phpver + (intval($temp[1]) * 10);
case 1:
$phpver = $phpver + (intval($temp[0]) * 100);
default:
}
echo $phpver;
?> |
|
| Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP, PHP, HTML, PDF, Excel | | | chdir -- change directory Categories : PHP, PHP Functions, Directories | | | REALTIME SHIPPING QUOTE Categories : Complete Programs, Ecommerce, PHP | | | A script to generate a report from a valid mysql connection. The user has to supply which fields he wants to display in table. All properties are changable.
Categories : PHP, PHP Classes, Databases, MySQL, HTML and PHP | | | Why do i get a Save As dialog box when I type in the url of a php3 file Categories : PHP Configuration, PHP, Apache, Web Servers | | | Simple PHP control CSS Calendar Categories : PHP, HTML and PHP, Calendar, Date Time, CSS | | | PHP class generator, must be used from Command line interface. Categories : PHP, PHP Classes, Shell Scripting | | | Automatically printing the contents of an sql table in MySQL. Categories : MySQL, PHP, HTML and PHP, Databases | | | XPertMailer - Sends TRUE Mails Categories : PHP, Mail, SMTP, PHP Classes | | | error_log -- send an error message somewhere Categories : PHP, PHP Functions, Errors and Logging | | | My Box - PHP Class that calculates the volumetric weight of a package.
Categories : PHP, Object Oriented, PHP Classes, Beginner Guides, Payment Gateways | | | ECHO-PHP Class Real Time Transaction Processor v1.4.4 for Credit Cards and
Checks / ACH Categories : PHP Classes, Cybercash, Classes and Objects, Ecommerce, PHP | | | Easily Grant Temporary SSH Access to yourself when in remote location Categories : PHP, Linux, Cron, Security | | | Calculate the great circle distance between two latitude/longitudes
Categories : Algorithms, PHP | | | ElfReader: An ELF (Executable and Linking Format) header information in PHP. Shows how to use the UNPACK function to read data. Categories : PHP, Linux, PHP Classes | |
| |
| |
|