|
Server IP : 127.0.0.1 / Your IP : 127.0.0.1 Web Server : Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3 System : Windows NT WIN-R7LTCC7BPLI 6.3 build 9200 (Windows Server 2012 R2 Datacenter Edition) i586 User : GerbangSIPAD ( 0) PHP Version : 5.6.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF Directory (0777) : C:/xampp8.1/php/tests/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/**
* Request #6056 Add support for reporting max PHP version
*
* PHP versions 4 and 5
*
* @category PHP
* @package PHP_CompatInfo
* @author Laurent Laville <pear@laurent-laville.org>
* @license http://www.opensource.org/licenses/bsd-license.php BSD
* @version CVS: $Id: checkMax.php,v 1.5 2008/07/22 20:27:11 farell Exp $
* @link http://pear.php.net/bugs/bug.php?id=6056
* @ignore
*/
require_once 'PHP/CompatInfo.php';
$info = new PHP_CompatInfo();
$file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'sample_req6056.php';
$arr = array($file, __FILE__);
$options = array('debug' => true);
$res = $info->parseArray($arr, $options);
echo 'PHP min = ' . $res['version'] . "<br />\n";
if ($res['max_version'] != '') {
echo 'PHP max = ' . $res['max_version'] . "<br />\n";
foreach ($arr as $file) {
$min = $res[$file]['version'];
$max = $res[$file]['max_version'];
if (($max != '') && (version_compare($min, $max) === 1)) {
echo 'ATTENTION file "'.$file.
'" cannot run : PHP version Min > Max '."\n";
}
}
}
if (count($res['extensions'])) {
echo 'Extensions required : ' . implode(', ', $res['extensions']) . "<br />\n";
}
echo '<pre>';
var_dump($res);
echo '</pre>';
?>