| px | top | add code | search | signup | login | help |
<?php
/*
* 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.
*/
$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;
?>
Comments or questions?
PX is running PHP 5.2.11
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.