Is it possible to obtain the PHP Version runtime? I mean somthing to make a code like this: if ($phpVersion > 4.3) { doSomething } else { doSomethingElse } Code (markup): So I could wirite a code that would use some things if they are present, and my code would be more portable.
<?php phpinfo(); ?> Shows the version. Have a look on php.net to see whether it can return the version as the output to use in statements. Actually, yuor answer seems to be here: http://uk2.php.net/manual/en/function.phpversion.php Just evaluate the string in a comparison.