Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP: Detect required version

How could I detect which version of PHP my PHP script requires? The general version like PHP5 or PHP4 could I know myself, but there are some function which are added not in the minor relase.

like image 763
Poru Avatar asked Jan 25 '10 16:01

Poru


1 Answers

One of the ways is:

if (!function_exists('function_name')) {
    // the PHP version is not sufficient
}
like image 84
raveren Avatar answered Sep 29 '22 10:09

raveren