~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to tests/lang/bug30862.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Bug #30862 (Static array with boolean indexes)
 
3
--FILE--
 
4
<?php 
 
5
class T {
 
6
        static $a = array(false=>"false", true=>"true");
 
7
}
 
8
print_r(T::$a);
 
9
?>
 
10
----------
 
11
<?php
 
12
define("X",0);
 
13
define("Y",1);
 
14
class T2 {
 
15
        static $a = array(X=>"false", Y=>"true");
 
16
}
 
17
print_r(T2::$a);
 
18
?>
 
19
--EXPECT--
 
20
Array
 
21
(
 
22
    [0] => false
 
23
    [1] => true
 
24
)
 
25
----------
 
26
Array
 
27
(
 
28
    [0] => false
 
29
    [1] => true
 
30
)