blob: 96a0f9a963262f1fd5b1c69e38e0f1a836ecd760 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
--TEST--
Bug #69198 (Compact function generate array with length but no content)
--FILE--
<?php
if (false) {
$willNeverBeDefined = true;
}
$result = compact('willNeverBeDefined');
var_dump($result, empty($result), $result === array(), empty($willNeverBeDefined));
?>
--EXPECTF--
Notice: compact(): Undefined variable: willNeverBeDefined in %s on line %d
array(0) {
}
bool(true)
bool(true)
bool(true)
|