note 68290 deleted from language.oop5.decon by nlopess
| From: | nlopess@php.net | Date: | Fri, 21 Jul 2006 10:54:24 +0000 |
| Subject: | note 68290 deleted from language.oop5.decon by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-115009@lists.php.net to get a copy of this message | ||
Note Submitter: visus at portsonline dot net
----
This might be useful (if PHP_VERSION < 5):
function check_version($currentversion, $requiredversion)
{
list($majorC, $minorC, $editC) = split("[/.-]", $currentversion);
list($majorR, $minorR, $editR) = split("[/.-]", $requiredversion);
if($majorC > $majorR) return TRUE;
if($majorC < $majorR) return FALSE;
if($minorC > $minorR) return TRUE;
if($minorC < $minorR) return FALSE;
if($editC >= $editR) return TRUE;
return FALSE;
}
class object
{
function object()
{
if(!check_version(PHP_VERSION, "5"))
register_shutdown_function(array(&$this, "__destruct"));
}
function __destruct()
{
print("destruct called");
}
}