Skip to content

Commit 83950fc

Browse files
committed
Add more tests
1 parent 1760c38 commit 83950fc

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Zend/tests/falsetoarray.phpt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,30 @@ $false = false;
8383
$r42 = 42;
8484
$false[] &= $r42;
8585

86+
$false = false;
87+
$false2 = false;
88+
$false3 = false;
89+
function &g(){
90+
print "[018]\n";
91+
global $false;
92+
$false[] = 42;
93+
94+
$var1 = false;
95+
$GLOBALS["false2"] =& $var1;
96+
97+
print "[019]\n";
98+
$GLOBALS["false3"][] = 42;
99+
100+
print "[020]\n";
101+
static $f2 = false;
102+
return $f2;
103+
}
104+
105+
$false = &g();
106+
$false[] = 42;
107+
print "[021]\n";
108+
$false2[] = 42;
109+
86110
?>
87111
--EXPECTF--
88112
[001]
@@ -141,4 +165,16 @@ Deprecated: Automatic conversion of false to array is deprecated in %s
141165
Deprecated: Automatic conversion of false to array is deprecated in %s
142166
[017]
143167

168+
Deprecated: Automatic conversion of false to array is deprecated in %s
169+
[018]
170+
171+
Deprecated: Automatic conversion of false to array is deprecated in %s
172+
[019]
173+
174+
Deprecated: Automatic conversion of false to array is deprecated in %s
175+
[020]
176+
177+
Deprecated: Automatic conversion of false to array is deprecated in %s
178+
[021]
179+
144180
Deprecated: Automatic conversion of false to array is deprecated in %s

0 commit comments

Comments
 (0)