Hi
Is it possible to have PHP code support two versions of PHP? In particular, in PHP 4 I have code of the form
Now, in PHP 5 that needs to change to:
Is it possible to write code for this which will run on both PHP 4 and PHP 5? As a C programmer, I am thinking of something like:
Thanks.
Is it possible to have PHP code support two versions of PHP? In particular, in PHP 4 I have code of the form
Code:
$obj->__clone();
Code:
clone $obj;
Is it possible to write code for this which will run on both PHP 4 and PHP 5? As a C programmer, I am thinking of something like:
Code:
#if PHP_VERSION<5
$obj->__clone();
#else
clone $obj;
#endif
Thanks.