Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * Request #6056 Add support for reporting max PHP version. Sample code.
4
 *
5
 * PHP versions 4 and 5
6
 *
7
 * @category PHP
8
 * @package  PHP_CompatInfo
9
 * @author   Laurent Laville <pear@laurent-laville.org>
10
 * @license  http://www.php.net/license/3_01.txt  PHP License 3.01
11
 * @version  CVS: $Id: sample_req6056.php,v 1.4 2007/11/15 18:23:40 farell Exp $
12
 * @link     http://pear.php.net/bugs/bug.php?id=6056
13
 * @ignore
14
 */
15
 
16
class Request6056
17
{
18
    /**
19
     * Sample code to check max php version
20
     *
21
     * @return void
22
     */
23
    function testMaxVersion()
24
    {
25
        // PHP 5 <= 5.0.4
26
        $res = php_check_syntax('bug6581.php');
27
 
28
        $array1 = array('blue'  => 1, 'red'  => 2, 'green'  => 3);
29
        $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7);
30
 
31
        // PHP 5 >= 5.1.0RC1
32
        $diff = array_diff_key($array1, $array2);
33
    }
34
}
35
 
36
?>